Fix CXX_BUILD.

This commit is contained in:
Themaister 2013-03-15 09:21:47 +01:00
parent 9a21151be2
commit eeba16d0e8
2 changed files with 5 additions and 2 deletions

View File

@ -254,6 +254,7 @@ static bool gfx_ctx_set_video_mode(
bool windowed_full = g_settings.video.windowed_fullscreen;
bool true_full = false;
int (*old_handler)(Display*, XErrorEvent*) = NULL;
XSetWindowAttributes swa = {0};
@ -384,7 +385,7 @@ static bool gfx_ctx_set_video_mode(
gfx_ctx_swap_interval(g_interval);
// This can blow up on some drivers. It's not fatal, so override errors for this call.
int (*old_handler)(Display*, XErrorEvent*) = XSetErrorHandler(nul_handler);
old_handler = XSetErrorHandler(nul_handler);
XSetInputFocus(g_dpy, g_win, RevertToNone, CurrentTime);
XSync(g_dpy, False);
XSetErrorHandler(old_handler);

View File

@ -292,6 +292,8 @@ static bool gfx_ctx_set_video_mode(
int x_off = 0;
int y_off = 0;
int (*old_handler)(Display*, XErrorEvent*) = NULL;
EGLint vid;
if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid))
goto error;
@ -408,7 +410,7 @@ static bool gfx_ctx_set_video_mode(
gfx_ctx_swap_interval(g_interval);
// This can blow up on some drivers. It's not fatal, so override errors for this call.
int (*old_handler)(Display*, XErrorEvent*) = XSetErrorHandler(nul_handler);
old_handler = XSetErrorHandler(nul_handler);
XSetInputFocus(g_dpy, g_win, RevertToNone, CurrentTime);
XSync(g_dpy, False);
XSetErrorHandler(old_handler);