mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed crash using too small list shifttimes
This commit is contained in:
parent
b8d055f568
commit
dddb273526
@ -305,6 +305,7 @@ void cShifter::Init(void) {
|
||||
mode = (eShiftMode)shiftable->ShiftMode();
|
||||
shiftable->ShiftPositions(&start, &end);
|
||||
int steps = (double)shifttime / (double)frametime;
|
||||
if (steps <= 0) steps = 1;
|
||||
float percentFast = 33.3f;
|
||||
float distanceFast = 85.0f;
|
||||
stepsFast = (float)steps * percentFast / 100.0f;
|
||||
@ -400,6 +401,7 @@ cListShifter::cListShifter(cListShiftable *shiftable) {
|
||||
distance = shiftable->ShiftDistance();
|
||||
orientation = shiftable->ShiftOrientation();
|
||||
int steps = (double)shifttime / (double)frametime;
|
||||
if (steps <= 0) steps = 1;
|
||||
step = distance / steps;
|
||||
shiftin = true;
|
||||
fromtop = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user