mirror of
https://github.com/lostjared/Acid.Cam.v2.Qt.git
synced 2025-12-13 18:30:02 +01:00
fixed counter index
This commit is contained in:
@@ -353,11 +353,13 @@ void Playback::run() {
|
|||||||
msleep(duration/2);
|
msleep(duration/2);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(_custom_cycle_index > static_cast<int>(cur.size()))
|
if(_custom_cycle_index > static_cast<int>(cur.size()-1))
|
||||||
_custom_cycle_index = 0;
|
_custom_cycle_index = 0;
|
||||||
|
|
||||||
drawFilter(frame, cur[_custom_cycle_index]);
|
if(_custom_cycle_index >= 0 && _custom_cycle_index < cur.size()) {
|
||||||
msleep(duration/2);
|
drawFilter(frame, cur[_custom_cycle_index]);
|
||||||
|
msleep(duration/2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
drawEffects(frame);
|
drawEffects(frame);
|
||||||
static int delay_counter = 0;
|
static int delay_counter = 0;
|
||||||
@@ -365,7 +367,7 @@ void Playback::run() {
|
|||||||
if(delay_counter > (fps_delay * static_cast<int>(ac::fps))) {
|
if(delay_counter > (fps_delay * static_cast<int>(ac::fps))) {
|
||||||
delay_counter = 0;
|
delay_counter = 0;
|
||||||
++_custom_cycle_index;
|
++_custom_cycle_index;
|
||||||
if(_custom_cycle_index > static_cast<int>(cur.size()))
|
if(_custom_cycle_index > static_cast<int>(cur.size()-1))
|
||||||
_custom_cycle_index = 0;
|
_custom_cycle_index = 0;
|
||||||
}
|
}
|
||||||
mutex.unlock();
|
mutex.unlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user