mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-05 06:47:45 -04:00
SDL video: Use a hardware surface and double buffering
This commit is contained in:
parent
3e0af0815a
commit
17def48f1f
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ int plat_sdl_change_video_mode(int w, int h, int force)
|
|||
if (plat_target.vout_method == 0) {
|
||||
SDL_PumpEvents();
|
||||
|
||||
plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_SWSURFACE);
|
||||
plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
|
||||
if (plat_sdl_screen == NULL) {
|
||||
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
|
||||
return -1;
|
||||
|
@ -227,7 +227,7 @@ int plat_sdl_init(void)
|
|||
|
||||
// overlay/gl require native bpp in some cases..
|
||||
plat_sdl_screen = SDL_SetVideoMode(g_menuscreen_w, g_menuscreen_h,
|
||||
0, SDL_SWSURFACE);
|
||||
0, plat_sdl_screen->flags);
|
||||
if (plat_sdl_screen == NULL) {
|
||||
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
|
||||
goto fail;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue