(fbdev context drivers) style nits

This commit is contained in:
twinaphex 2015-09-09 19:58:05 +02:00
parent c230abc9c7
commit 54dbe5e66b
2 changed files with 9 additions and 13 deletions

View File

@ -111,6 +111,7 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
EGLint num_config;
EGLint egl_version_major, egl_version_minor;
EGLint format;
struct sigaction sa = {{0}};
static const EGLint attribs[] = {
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
@ -120,7 +121,8 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
EGL_ALPHA_SIZE, 8,
EGL_NONE
};
struct sigaction sa = {{0}};
(void)data;
sa.sa_handler = gfx_ctx_mali_fbdev_sighandler;
sa.sa_flags = SA_RESTART;
@ -128,8 +130,6 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
sigaction(SIGINT, &sa, NULL);
sigaction(SIGTERM, &sa, NULL);
(void)data;
/* Disable cursor blinking so it's not visible in RetroArch. */
system("setterm -cursor off");
@ -147,8 +147,8 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
goto error;
}
RARCH_LOG("[Mali fbdev]: EGL version: %d.%d\n", egl_version_major, egl_version_minor);
RARCH_LOG("[Mali fbdev]: EGL version: %d.%d\n",
egl_version_major, egl_version_minor);
if (!eglChooseConfig(g_egl_dpy, attribs, &g_egl_config, 1, &num_config))
{
@ -167,7 +167,6 @@ error:
static void gfx_ctx_mali_fbdev_swap_buffers(void *data)
{
(void)data;
eglSwapBuffers(g_egl_dpy, g_egl_surf);
}

View File

@ -40,11 +40,8 @@ static void sighandler(int sig)
static void gfx_ctx_vivante_set_swap_interval(void *data, unsigned interval)
{
(void)data;
if (!g_egl_dpy)
return;
eglSwapInterval(g_egl_dpy, interval);
if (g_egl_dpy)
eglSwapInterval(g_egl_dpy, interval);
}
static void gfx_ctx_vivante_destroy(void *data)
@ -215,8 +212,8 @@ static bool gfx_ctx_vivante_set_video_mode(void *data,
if (!height || !fullscreen)
height = 1024;
g_width = width;
g_height = height;
g_width = width;
g_height = height;
window = fbCreateWindow(fbGetDisplayByIndex(0), 0, 0, 0, 0);
g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, window, 0);