Taseditor: yet another "lost_position" logic change
This commit is contained in:
parent
54d119e002
commit
426ee4cb94
|
@ -403,11 +403,12 @@ void GREENZONE::InvalidateAndCheck(int after)
|
||||||
if (currFrameCounter >= greenZoneCount)
|
if (currFrameCounter >= greenZoneCount)
|
||||||
{
|
{
|
||||||
// remember the lost position
|
// remember the lost position
|
||||||
if (playback.lost_position_frame < currFrameCounter + 1)
|
if ((playback.lost_position_frame < currFrameCounter + 1) || (playback.lost_position_frame > currFrameCounter + 1 && !playback.lost_position_must_be_fixed))
|
||||||
{
|
{
|
||||||
if (playback.lost_position_frame)
|
if (playback.lost_position_frame)
|
||||||
piano_roll.RedrawRow(playback.lost_position_frame - 1);
|
piano_roll.RedrawRow(playback.lost_position_frame - 1);
|
||||||
playback.lost_position_frame = currFrameCounter + 1;
|
playback.lost_position_frame = currFrameCounter + 1;
|
||||||
|
playback.lost_position_must_be_fixed = true;
|
||||||
}
|
}
|
||||||
// auto-restore position if needed
|
// auto-restore position if needed
|
||||||
if (taseditor_config.restore_position)
|
if (taseditor_config.restore_position)
|
||||||
|
|
|
@ -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;
|
||||||
old_show_pauseframe = show_pauseframe = false;
|
lost_position_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;
|
||||||
|
@ -228,6 +228,10 @@ void PLAYBACK::update()
|
||||||
RedrawMarker();
|
RedrawMarker();
|
||||||
must_find_current_marker = false;
|
must_find_current_marker = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!emu_paused)
|
||||||
|
// when emulating, lost_position_frame becomes unfixed
|
||||||
|
lost_position_must_be_fixed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PLAYBACK::updateProgressbar()
|
void PLAYBACK::updateProgressbar()
|
||||||
|
@ -486,15 +490,7 @@ void PLAYBACK::SetProgressbar(int a, int b)
|
||||||
void PLAYBACK::CancelSeeking()
|
void PLAYBACK::CancelSeeking()
|
||||||
{
|
{
|
||||||
if (pause_frame)
|
if (pause_frame)
|
||||||
{
|
|
||||||
// also invalidate lost_position_frame if user cancelled seeking to it
|
|
||||||
if (lost_position_frame == pause_frame)
|
|
||||||
{
|
|
||||||
piano_roll.RedrawRow(lost_position_frame - 1);
|
|
||||||
lost_position_frame = 0;
|
|
||||||
}
|
|
||||||
SeekingStop();
|
SeekingStop();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
LRESULT APIENTRY UpperMarkerEditWndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||||
|
|
|
@ -45,6 +45,7 @@ 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
|
||||||
int pause_frame;
|
int pause_frame;
|
||||||
bool must_find_current_marker;
|
bool must_find_current_marker;
|
||||||
int shown_marker;
|
int shown_marker;
|
||||||
|
|
Loading…
Reference in New Issue