notaz.gp2x.de
/
libpicofe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3e0af08
)
SDL video: Use a hardware surface and double buffering
author
Paul Cercueil
<paul@crapouillou.net>
Sun, 22 Sep 2013 10:35:49 +0000
(07:35 -0300)
committer
Paul Cercueil
<paul@crapouillou.net>
Mon, 7 Oct 2013 15:11:03 +0000
(17:11 +0200)
plat_sdl.c
patch
|
blob
|
blame
|
history
diff --git
a/plat_sdl.c
b/plat_sdl.c
index
cae6340
..
bbb466e
100644
(file)
--- 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();
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;
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,
// 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;
if (plat_sdl_screen == NULL) {
fprintf(stderr, "SDL_SetVideoMode failed: %s\n", SDL_GetError());
goto fail;