Taseditor: one more time
This commit is contained in:
parent
426ee4cb94
commit
f04ce9e08f
|
@ -413,7 +413,7 @@ void GREENZONE::InvalidateAndCheck(int after)
|
||||||
// auto-restore position if needed
|
// auto-restore position if needed
|
||||||
if (taseditor_config.restore_position)
|
if (taseditor_config.restore_position)
|
||||||
{
|
{
|
||||||
if (playback.pause_frame)
|
if (playback.pause_frame && playback.pause_frame_must_be_fixed)
|
||||||
playback.jump(playback.pause_frame - 1);
|
playback.jump(playback.pause_frame - 1);
|
||||||
else
|
else
|
||||||
playback.jump(currFrameCounter);
|
playback.jump(currFrameCounter);
|
||||||
|
|
|
@ -72,7 +72,7 @@ void PLAYBACK::reset()
|
||||||
shown_marker = 0;
|
shown_marker = 0;
|
||||||
lastCursor = currFrameCounter;
|
lastCursor = currFrameCounter;
|
||||||
lost_position_frame = pause_frame = old_pauseframe = 0;
|
lost_position_frame = pause_frame = old_pauseframe = 0;
|
||||||
lost_position_must_be_fixed = old_show_pauseframe = show_pauseframe = false;
|
lost_position_must_be_fixed = pause_frame_must_be_fixed = old_show_pauseframe = show_pauseframe = false;
|
||||||
old_rewind_button_state = rewind_button_state = false;
|
old_rewind_button_state = rewind_button_state = false;
|
||||||
old_forward_button_state = forward_button_state = false;
|
old_forward_button_state = forward_button_state = false;
|
||||||
old_rewind_full_button_state = rewind_full_button_state = false;
|
old_rewind_full_button_state = rewind_full_button_state = false;
|
||||||
|
@ -229,7 +229,10 @@ void PLAYBACK::update()
|
||||||
must_find_current_marker = false;
|
must_find_current_marker = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!emu_paused)
|
if (emu_paused)
|
||||||
|
// when paused, pause_frame becomes unfixed
|
||||||
|
pause_frame_must_be_fixed = false;
|
||||||
|
else
|
||||||
// when emulating, lost_position_frame becomes unfixed
|
// when emulating, lost_position_frame becomes unfixed
|
||||||
lost_position_must_be_fixed = false;
|
lost_position_must_be_fixed = false;
|
||||||
}
|
}
|
||||||
|
@ -271,6 +274,7 @@ void PLAYBACK::RestorePosition()
|
||||||
{
|
{
|
||||||
// start seeking from here to lost_position_frame
|
// start seeking from here to lost_position_frame
|
||||||
pause_frame = lost_position_frame;
|
pause_frame = lost_position_frame;
|
||||||
|
pause_frame_must_be_fixed = true;
|
||||||
seeking_start_frame = currFrameCounter;
|
seeking_start_frame = currFrameCounter;
|
||||||
if (taseditor_config.turbo_seek)
|
if (taseditor_config.turbo_seek)
|
||||||
turbo = true;
|
turbo = true;
|
||||||
|
@ -296,6 +300,7 @@ void PLAYBACK::MiddleButtonClick()
|
||||||
// start seeking to the Marker
|
// start seeking to the Marker
|
||||||
seeking_start_frame = currFrameCounter;
|
seeking_start_frame = currFrameCounter;
|
||||||
pause_frame = target_frame + 1;
|
pause_frame = target_frame + 1;
|
||||||
|
pause_frame_must_be_fixed = true;
|
||||||
if (taseditor_config.turbo_seek)
|
if (taseditor_config.turbo_seek)
|
||||||
turbo = true;
|
turbo = true;
|
||||||
}
|
}
|
||||||
|
@ -308,6 +313,7 @@ void PLAYBACK::MiddleButtonClick()
|
||||||
// start seeking to selection_beginning
|
// start seeking to selection_beginning
|
||||||
seeking_start_frame = currFrameCounter;
|
seeking_start_frame = currFrameCounter;
|
||||||
pause_frame = selection_beginning + 1;
|
pause_frame = selection_beginning + 1;
|
||||||
|
pause_frame_must_be_fixed = true;
|
||||||
if (taseditor_config.turbo_seek)
|
if (taseditor_config.turbo_seek)
|
||||||
turbo = true;
|
turbo = true;
|
||||||
}
|
}
|
||||||
|
@ -326,6 +332,7 @@ void PLAYBACK::SeekingStart(int finish_frame)
|
||||||
{
|
{
|
||||||
seeking_start_frame = currFrameCounter;
|
seeking_start_frame = currFrameCounter;
|
||||||
pause_frame = finish_frame;
|
pause_frame = finish_frame;
|
||||||
|
pause_frame_must_be_fixed = true;
|
||||||
}
|
}
|
||||||
if (taseditor_config.turbo_seek)
|
if (taseditor_config.turbo_seek)
|
||||||
turbo = true;
|
turbo = true;
|
||||||
|
@ -335,6 +342,7 @@ void PLAYBACK::SeekingStart(int finish_frame)
|
||||||
void PLAYBACK::SeekingStop()
|
void PLAYBACK::SeekingStop()
|
||||||
{
|
{
|
||||||
pause_frame = 0;
|
pause_frame = 0;
|
||||||
|
pause_frame_must_be_fixed = false;
|
||||||
turbo = false;
|
turbo = false;
|
||||||
PauseEmulation();
|
PauseEmulation();
|
||||||
SetProgressbar(1, 1);
|
SetProgressbar(1, 1);
|
||||||
|
|
|
@ -45,8 +45,9 @@ public:
|
||||||
|
|
||||||
int lastCursor; // but for currentCursor we use external variable currFrameCounter
|
int lastCursor; // but for currentCursor we use external variable currFrameCounter
|
||||||
int lost_position_frame;
|
int lost_position_frame;
|
||||||
bool lost_position_must_be_fixed; // when Greenzone invalidates several times, but the end of current segment must remain the same
|
bool lost_position_must_be_fixed; // for when Greenzone invalidates several times, but the end of current segment must remain the same
|
||||||
int pause_frame;
|
int pause_frame;
|
||||||
|
bool pause_frame_must_be_fixed; // for "Auto-restore last position"
|
||||||
bool must_find_current_marker;
|
bool must_find_current_marker;
|
||||||
int shown_marker;
|
int shown_marker;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue