mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-04 22:47:44 -04:00
Merge pull request #8 from irixxxx/master
improve SDL support (triple buffering, bugfix)
This commit is contained in:
commit
b0dc47ecea
1 changed files with 5 additions and 0 deletions
|
@ -123,7 +123,11 @@ int plat_sdl_change_video_mode(int w, int h, int force)
|
|||
if (plat_target.vout_method == 0) {
|
||||
SDL_PumpEvents();
|
||||
|
||||
#if defined(SDL_TRIPLEBUF) && defined(SDL_BUFFER_3X)
|
||||
plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_TRIPLEBUF);
|
||||
#else
|
||||
plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
|
||||
#endif
|
||||
if (plat_sdl_screen == NULL) {
|
||||
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
@ -291,6 +295,7 @@ int plat_sdl_init(void)
|
|||
}
|
||||
plat_target.vout_methods = vout_list;
|
||||
|
||||
plat_sdl_change_video_mode(g_menuscreen_w, g_menuscreen_h, 1);
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue