mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -04:00
add triplebuffering support
This commit is contained in:
parent
9ba0831411
commit
34e55f235e
1 changed files with 4 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) {
|
if (plat_target.vout_method == 0) {
|
||||||
SDL_PumpEvents();
|
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);
|
plat_sdl_screen = SDL_SetVideoMode(w, h, 16, SDL_HWSURFACE | SDL_DOUBLEBUF);
|
||||||
|
#endif
|
||||||
if (plat_sdl_screen == NULL) {
|
if (plat_sdl_screen == NULL) {
|
||||||
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
|
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
|
||||||
return -1;
|
return -1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue