Skip to content

Commit

Permalink
fix CLI last frame update, Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
ThFriedrich committed Apr 21, 2022
1 parent 09a470a commit 84721c3
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1067,18 +1067,29 @@ int run_cli(int argc, char *argv[], Ricom *ricom)
std::thread run_thread;
run_thread = std::thread(run_ricom, ricom, ricom->mode);
run_thread.detach();

bool b_redraw = false;
SDL_Delay(ricom->redraw_interval * 2);
while (1)
{
if (ricom->p_prog_mon != nullptr && ricom->p_prog_mon->report_set_public)
if (ricom->p_prog_mon != nullptr)
{
if (ricom->p_prog_mon->report_set_public)
{
b_redraw = true;
ricom->p_prog_mon->report_set_public = false;
}
}
else
{
b_redraw = true;
}
if (b_redraw)
{
update_image(tex, renderer, ricom->srf_ricom);
if (ricom->b_vSTEM)
{
update_image(stem, renderer_stem, ricom->srf_stem);
}
ricom->p_prog_mon->report_set_public = false;
}

while (SDL_PollEvent(&event))
Expand Down

0 comments on commit 84721c3

Please sign in to comment.