(griffin) Fix glx, xegl and xvideo build

This commit is contained in:
Higor Eurípedes 2015-02-20 21:34:59 -03:00
parent f8e4fa25bb
commit c281f0fc68
3 changed files with 12 additions and 12 deletions

View File

@ -90,7 +90,7 @@ static void xv_set_nonblock_state(void *data, bool state)
}
static volatile sig_atomic_t g_quit = 0;
static void sighandler(int sig)
static void xvideo_sighandler(int sig)
{
g_quit = 1;
}
@ -548,7 +548,7 @@ static void *xv_init(const video_info_t *video,
if (xv->quit_atom)
XSetWMProtocols(xv->display, xv->window, &xv->quit_atom, 1);
sa.sa_handler = sighandler;
sa.sa_handler = xvideo_sighandler;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL);

View File

@ -64,7 +64,7 @@ static unsigned g_minor;
static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs;
static void sighandler(int sig)
static void glx_sighandler(int sig)
{
(void)sig;
g_quit = 1;
@ -82,7 +82,7 @@ static Bool glx_wait_notify(Display *d, XEvent *e, char *arg)
return (e->type == MapNotify) && (e->xmap.window == glx->g_win);
}
static int nul_handler(Display *dpy, XErrorEvent *event)
static int glx_nul_handler(Display *dpy, XErrorEvent *event)
{
(void)dpy;
(void)event;
@ -401,7 +401,7 @@ static bool gfx_ctx_glx_set_video_mode(void *data,
gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)driver.video_context_data;
struct sigaction sa = {{0}};
sa.sa_handler = sighandler;
sa.sa_handler = glx_sighandler;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL);
@ -595,7 +595,7 @@ static bool gfx_ctx_glx_set_video_mode(void *data,
gfx_ctx_glx_swap_interval(data, glx->g_interval);
/* This can blow up on some drivers. It's not fatal, so override errors for this call. */
old_handler = XSetErrorHandler(nul_handler);
old_handler = XSetErrorHandler(glx_nul_handler);
XSetInputFocus(glx->g_dpy, glx->g_win, RevertToNone, CurrentTime);
XSync(glx->g_dpy, False);
XSetErrorHandler(old_handler);

View File

@ -62,7 +62,7 @@ static enum gfx_ctx_api g_api;
static unsigned g_major;
static unsigned g_minor;
static void sighandler(int sig)
static void egl_sighandler(int sig)
{
(void)sig;
g_quit = 1;
@ -75,7 +75,7 @@ static Bool egl_wait_notify(Display *d, XEvent *e, char *arg)
return e->type == MapNotify && e->xmap.window == g_win;
}
static int nul_handler(Display *dpy, XErrorEvent *event)
static int egl_nul_handler(Display *dpy, XErrorEvent *event)
{
(void)dpy;
(void)event;
@ -365,7 +365,7 @@ error:
return false;
}
static EGLint *egl_fill_attribs(EGLint *attr)
static EGLint *xegl_fill_attribs(EGLint *attr)
{
switch (g_api)
{
@ -445,7 +445,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
XSetWindowAttributes swa = {0};
XVisualInfo *vi = NULL;
sa.sa_handler = sighandler;
sa.sa_handler = egl_sighandler;
sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL);
@ -457,7 +457,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
int (*old_handler)(Display*, XErrorEvent*) = NULL;
attr = egl_attribs;
attr = egl_fill_attribs(attr);
attr = xegl_fill_attribs(attr);
if (!eglGetConfigAttrib(g_egl_dpy, g_config, EGL_NATIVE_VISUAL_ID, &vid))
goto error;
@ -592,7 +592,7 @@ static bool gfx_ctx_xegl_set_video_mode(void *data,
/* This can blow up on some drivers. It's not fatal,
* so override errors for this call.
*/
old_handler = XSetErrorHandler(nul_handler);
old_handler = XSetErrorHandler(egl_nul_handler);
XSetInputFocus(g_dpy, g_win, RevertToNone, CurrentTime);
XSync(g_dpy, False);
XSetErrorHandler(old_handler);