Skip to content

Commit

Permalink
Also call render from the user thread
Browse files Browse the repository at this point in the history
Someone moved the call to render out of the thread loop and into
the texture update function. Same rationale for putting it back.
It should not overlap other user code and it should be possible
to detect if the user code hangs.
  • Loading branch information
ali1234 committed Sep 29, 2021
1 parent b2cf450 commit 405ccdb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 32blit-sdl/System.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,15 @@ void System::loop()
blit::joystick.y = shadow_joystick[1];
SDL_UnlockMutex(m_input);
blit::tick(::now());
blit_multiplayer->update();
blit::render(::now());
blit_multiplayer->update();
}

Uint32 System::mode() {
return _mode;
}

void System::update_texture(SDL_Texture *texture) {
blit::render(::now());
if (_mode == blit::ScreenMode::lores) {
SDL_UpdateTexture(texture, nullptr, __fb_lores.data, 160 * 3);
}
Expand Down

0 comments on commit 405ccdb

Please sign in to comment.