X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plat_sdl.c;h=bbb466e3a47db9158b2455370e06dd1967b0606d;hb=e7f580052c03fa3f4603051c1b718be4bd8b2db7;hp=7f56ae66309b0e96664ef465eee4db70228dbe9e;hpb=da0cc55643353ab15725194be64a3d8460fe48b1;p=libpicofe.git diff --git a/plat_sdl.c b/plat_sdl.c index 7f56ae6..bbb466e 100644 --- a/plat_sdl.c +++ b/plat_sdl.c @@ -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; @@ -262,6 +262,8 @@ int plat_sdl_init(void) window = (void *)wminfo.info.x11.window; } } +#else + (void)wminfo; #endif ret = gl_init(display, window, &gl_quirks);