From ce3bdc9aeceb151f373d84ee73913348dbefd632 Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 6 Jan 2011 20:06:48 +0100 Subject: [PATCH] Add a warning when vsync cannot be changed... --- gfx/gl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/gl.c b/gfx/gl.c index 70a9f83e15..b65e9f2e52 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -272,6 +272,10 @@ static void gl_set_nonblock_state(void *data, bool state) { SSNES_LOG("GL VSync => %s\n", state ? "off" : "on"); SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, state ? 0 : 1); + int attr = 0; + SDL_GL_GetAttribute(SDL_GL_SWAP_CONTROL, &attr); + if ((bool)attr == state) + SSNES_WARN("Couldn't change VSync settings. Fast forwarding might not work.\n"); //SDL_SetVideoMode(gl->win_width, gl->win_height, 32, SDL_OPENGL | SDL_RESIZABLE | (g_settings.video.fullscreen ? SDL_FULLSCREEN : 0)); } }