1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-18 00:40:36 +00:00

(Mali Ctx) Cleanup

This commit is contained in:
twinaphex 2015-04-03 04:40:53 +02:00
parent 951547eb70
commit bccb9a3203

@ -38,7 +38,8 @@ static bool g_resize;
static unsigned g_width, g_height; static unsigned g_width, g_height;
static volatile sig_atomic_t g_quit; static volatile sig_atomic_t g_quit;
static void sighandler(int sig)
static void gfx_ctx_mali_fbdev_sighandler(int sig)
{ {
(void)sig; (void)sig;
g_quit = 1; g_quit = 1;
@ -54,6 +55,7 @@ static void gfx_ctx_mali_fbdev_set_swap_interval(
static void gfx_ctx_mali_fbdev_destroy(void *data) static void gfx_ctx_mali_fbdev_destroy(void *data)
{ {
int fd;
(void)data; (void)data;
if (g_egl_dpy != EGL_NO_DISPLAY) if (g_egl_dpy != EGL_NO_DISPLAY)
@ -80,7 +82,7 @@ static void gfx_ctx_mali_fbdev_destroy(void *data)
g_resize = false; g_resize = false;
/* Clear framebuffer and set cursor on again */ /* Clear framebuffer and set cursor on again */
int fd = open("/dev/tty", O_RDWR); fd = open("/dev/tty", O_RDWR);
ioctl(fd,VT_ACTIVATE,5); ioctl(fd,VT_ACTIVATE,5);
ioctl(fd,VT_ACTIVATE,1); ioctl(fd,VT_ACTIVATE,1);
close (fd); close (fd);
@ -120,7 +122,7 @@ static bool gfx_ctx_mali_fbdev_init(void *data)
}; };
struct sigaction sa = {{0}}; struct sigaction sa = {{0}};
sa.sa_handler = sighandler; sa.sa_handler = gfx_ctx_mali_fbdev_sighandler;
sa.sa_flags = SA_RESTART; sa.sa_flags = SA_RESTART;
sigemptyset(&sa.sa_mask); sigemptyset(&sa.sa_mask);
sigaction(SIGINT, &sa, NULL); sigaction(SIGINT, &sa, NULL);
@ -227,13 +229,13 @@ static bool gfx_ctx_mali_fbdev_set_video_mode(void *data,
} }
close (fb); close (fb);
width = vinfo.xres; width = vinfo.xres;
height = vinfo.yres; height = vinfo.yres;
g_width = width; g_width = width;
g_height = height; g_height = height;
native_window.width = vinfo.xres; native_window.width = vinfo.xres;
native_window.height = vinfo.yres; native_window.height = vinfo.yres;
if ((g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, &native_window, 0)) == EGL_NO_SURFACE) if ((g_egl_surf = eglCreateWindowSurface(g_egl_dpy, g_egl_config, &native_window, 0)) == EGL_NO_SURFACE)