Changed playback pauseFrame variable and accessor functions to be static in PLAYBACK class so that they are thread safe for Qt GUI.

This commit is contained in:
mjbudd77 2022-01-10 19:49:04 -05:00
parent a673ee4a26
commit e976ffac5b
3 changed files with 4 additions and 3 deletions

View File

@ -36,6 +36,7 @@ extern bool turbo;
// resources // resources
static char upperMarkerText[] = "Marker "; static char upperMarkerText[] = "Marker ";
int PLAYBACK::pauseFrame = 0;
PLAYBACK::PLAYBACK() PLAYBACK::PLAYBACK()
{ {

View File

@ -62,7 +62,7 @@ public:
int getLastPosition(); // actually returns lost_position_frame-1 int getLastPosition(); // actually returns lost_position_frame-1
void setLastPosition(int frame); void setLastPosition(int frame);
int getPauseFrame(); static int getPauseFrame();
int getFlashingPauseFrame(); int getFlashingPauseFrame();
void setProgressbar(int a, int b); void setProgressbar(int a, int b);
@ -76,7 +76,7 @@ public:
private: private:
bool setPlaybackAboveOrToFrame(int frame, bool forceStateReload = false); bool setPlaybackAboveOrToFrame(int frame, bool forceStateReload = false);
int pauseFrame; static int pauseFrame;
int lastPositionFrame; int lastPositionFrame;
bool lastPositionIsStable; // for when Greenzone invalidates several times, but the end of current segment must remain the same bool lastPositionIsStable; // for when Greenzone invalidates several times, but the end of current segment must remain the same

View File

@ -1200,7 +1200,7 @@ static void DoFun(int frameskip, int periodic_saves)
{ {
int runToFrameTarget; int runToFrameTarget;
runToFrameTarget = tasWin->playback.getPauseFrame(); runToFrameTarget = PLAYBACK::getPauseFrame();
if ( runToFrameTarget >= 0) if ( runToFrameTarget >= 0)
{ {