Add nonused VSync code for OSX.
This commit is contained in:
parent
eee89dddb1
commit
bafc4f596f
10
gfx/gl.c
10
gfx/gl.c
|
@ -993,13 +993,21 @@ static void gl_set_nonblock_state(void *data, bool state)
|
||||||
if (gl->vsync)
|
if (gl->vsync)
|
||||||
{
|
{
|
||||||
SSNES_LOG("GL VSync => %s\n", state ? "off" : "on");
|
SSNES_LOG("GL VSync => %s\n", state ? "off" : "on");
|
||||||
#ifdef _WIN32
|
#if defined(_WIN32)
|
||||||
static BOOL (APIENTRY *wgl_swap_interval)(int) = NULL;
|
static BOOL (APIENTRY *wgl_swap_interval)(int) = NULL;
|
||||||
if (!wgl_swap_interval)
|
if (!wgl_swap_interval)
|
||||||
{
|
{
|
||||||
SDL_SYM_WRAP(wgl_swap_interval, "wglSwapIntervalEXT");
|
SDL_SYM_WRAP(wgl_swap_interval, "wglSwapIntervalEXT");
|
||||||
}
|
}
|
||||||
if (wgl_swap_interval) wgl_swap_interval(state ? 0 : 1);
|
if (wgl_swap_interval) wgl_swap_interval(state ? 0 : 1);
|
||||||
|
#elif defined(__APPLE__)
|
||||||
|
// Will this work?
|
||||||
|
//AGLContext ctx = aglGetCurrentContext();
|
||||||
|
//if (!ctx)
|
||||||
|
// return;
|
||||||
|
//GLint interval = state ? 0 : 1;
|
||||||
|
//aglSetInteger(ctx, AGL_SWAP_INTERVAL, &interval);
|
||||||
|
SSNES_WARN("This feature is currently not implemented for OSX.\n");
|
||||||
#else
|
#else
|
||||||
static int (*glx_swap_interval)(int) = NULL;
|
static int (*glx_swap_interval)(int) = NULL;
|
||||||
if (!glx_swap_interval)
|
if (!glx_swap_interval)
|
||||||
|
|
Loading…
Reference in New Issue