mirror of
https://github.com/RaySollium99/picodrive.git
synced 2025-09-05 07:17:45 -04:00
Add a couple of fixes to allow double buffering to work
This commit is contained in:
parent
28653a4979
commit
eb7ce29e8d
2 changed files with 12 additions and 4 deletions
|
@ -1379,6 +1379,8 @@ void emu_loop(void)
|
|||
{
|
||||
notice_msg_time = 0;
|
||||
plat_status_msg_clear();
|
||||
plat_video_flip();
|
||||
plat_status_msg_clear(); /* Do it again in case of double buffering */
|
||||
notice_msg = NULL;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -125,9 +125,11 @@ void plat_video_flip(void)
|
|||
gl_flip(shadow_fb, g_screen_width, g_screen_height);
|
||||
}
|
||||
else {
|
||||
// XXX: no locking, but should be fine with SDL_SWSURFACE?
|
||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||
SDL_UnlockSurface(plat_sdl_screen);
|
||||
SDL_Flip(plat_sdl_screen);
|
||||
g_screen_ptr = plat_sdl_screen->pixels;
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -147,7 +149,8 @@ void plat_video_menu_begin(void)
|
|||
g_menuscreen_ptr = shadow_fb;
|
||||
}
|
||||
else {
|
||||
SDL_LockSurface(plat_sdl_screen);
|
||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||
SDL_LockSurface(plat_sdl_screen);
|
||||
g_menuscreen_ptr = plat_sdl_screen->pixels;
|
||||
}
|
||||
}
|
||||
|
@ -169,7 +172,8 @@ void plat_video_menu_end(void)
|
|||
gl_flip(g_menuscreen_ptr, g_menuscreen_w, g_menuscreen_h);
|
||||
}
|
||||
else {
|
||||
SDL_UnlockSurface(plat_sdl_screen);
|
||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||
SDL_UnlockSurface(plat_sdl_screen);
|
||||
SDL_Flip(plat_sdl_screen);
|
||||
}
|
||||
g_menuscreen_ptr = NULL;
|
||||
|
@ -188,9 +192,11 @@ void plat_video_loop_prepare(void)
|
|||
g_screen_ptr = shadow_fb;
|
||||
}
|
||||
else {
|
||||
SDL_LockSurface(plat_sdl_screen);
|
||||
if (SDL_MUSTLOCK(plat_sdl_screen))
|
||||
SDL_LockSurface(plat_sdl_screen);
|
||||
g_screen_ptr = plat_sdl_screen->pixels;
|
||||
}
|
||||
PicoDrawSetOutBuf(g_screen_ptr, g_screen_width * 2);
|
||||
}
|
||||
|
||||
void plat_early_init(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue