From: notaz Date: Sun, 18 Nov 2012 22:29:24 +0000 (+0200) Subject: frontend: sdl: autodisable overlay if not accelerated X-Git-Tag: r17~13 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6949dd2a369531ccf38c3f4fae7f6fcf3be6dcc6;p=pcsx_rearmed.git frontend: sdl: autodisable overlay if not accelerated just tried it on r-pi, it's just way too slow --- diff --git a/.gitignore b/.gitignore index 3310044d..e6fc06b9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.o +*.a +*.so tags cscope.out pandora diff --git a/frontend/plat_sdl.c b/frontend/plat_sdl.c index 36611498..9862e2b3 100644 --- a/frontend/plat_sdl.c +++ b/frontend/plat_sdl.c @@ -99,11 +99,16 @@ static int change_video_mode(int w, int h) if ((long)overlay->pixels[0] & 3) fprintf(stderr, "warning: overlay pointer is unaligned\n"); - if (!overlay->hw_overlay) - fprintf(stderr, "warning: video overlay is not hardware accelerated," - " you may want to disable it.\n"); - overlay_clear(); + if (!overlay->hw_overlay) { + fprintf(stderr, "warning: video overlay is not hardware accelerated, " + "disabling it.\n"); + g_use_overlay = 0; + SDL_FreeYUVOverlay(overlay); + overlay = NULL; + } + else + overlay_clear(); } else { fprintf(stderr, "warning: could not create overlay.\n");