Skip to content

Commit

Permalink
Fix few display issues
Browse files Browse the repository at this point in the history
  • Loading branch information
drfiemost committed Oct 24, 2024
1 parent c168479 commit c68b777
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -885,9 +885,10 @@ bool ConsolePlayer::open (void)
int delay = isNTSC ? 16 : 20;
m_thread = new std::thread([this](int delay)
{
while (m_state == playerRunning)
while (m_state != playerStopped)
{
updateDisplay();
if (m_state == playerRunning)
updateDisplay();
std::this_thread::sleep_for(std::chrono::milliseconds(delay));
}
}, delay);
Expand All @@ -897,7 +898,7 @@ bool ConsolePlayer::open (void)

void ConsolePlayer::close ()
{
m_engine.stop();
stop();
if (m_state == playerExit)
{ // Natural finish
emuflush ();
Expand Down
4 changes: 3 additions & 1 deletion src/player.h
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ class ConsolePlayer
sidplayfp m_engine;
SidConfig m_engCfg;
SidTune m_tune;
player_state_t m_state;

std::atomic<player_state_t> m_state;

const char* m_outfile;
std::string m_filename;

Expand Down

0 comments on commit c68b777

Please sign in to comment.