mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-12 04:31:19 +00:00
Cleanups
This commit is contained in:
parent
318d5490cd
commit
be1e245396
@ -635,10 +635,7 @@ static uint32_t android_gfx_ctx_get_flags(void *data)
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void android_gfx_ctx_set_flags(void *data, uint32_t flags)
|
||||
{
|
||||
(void)flags;
|
||||
}
|
||||
static void android_gfx_ctx_set_flags(void *data, uint32_t flags) { }
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_android = {
|
||||
android_gfx_ctx_init,
|
||||
|
@ -146,10 +146,6 @@ static void gfx_ctx_drm_swap_interval(void *data, int interval)
|
||||
static void gfx_ctx_drm_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
(void)data;
|
||||
(void)width;
|
||||
(void)height;
|
||||
|
||||
*resize = false;
|
||||
*quit = (bool)frontend_driver_get_signal_handler_state();
|
||||
}
|
||||
@ -157,10 +153,6 @@ static void gfx_ctx_drm_check_window(void *data, bool *quit,
|
||||
static void drm_flip_handler(int fd, unsigned frame,
|
||||
unsigned sec, unsigned usec, void *data)
|
||||
{
|
||||
(void)fd;
|
||||
(void)sec;
|
||||
(void)usec;
|
||||
|
||||
#if 0
|
||||
static unsigned first_page_flip;
|
||||
static unsigned last_page_flip;
|
||||
|
@ -487,23 +487,12 @@ static void gfx_ctx_vc_input_driver(void *data,
|
||||
*input_data = NULL;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_vc_has_focus(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return g_egl_inited;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
return false;
|
||||
}
|
||||
static bool gfx_ctx_vc_has_focus(void *data) { return g_egl_inited; }
|
||||
static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable) { return false; }
|
||||
|
||||
static float gfx_ctx_vc_translate_aspect(void *data,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
(void)data;
|
||||
/* Check for SD televisions: they should always be 4:3. */
|
||||
if ((width == 640 || width == 720) && (height == 480 || height == 576))
|
||||
return 4.0f / 3.0f;
|
||||
@ -587,8 +576,9 @@ fail:
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigned width,
|
||||
unsigned height, unsigned pitch, bool rgb32, unsigned index, void **image_handle)
|
||||
static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame,
|
||||
unsigned width, unsigned height,
|
||||
unsigned pitch, bool rgb32, unsigned index, void **image_handle)
|
||||
{
|
||||
bool ret = false;
|
||||
vc_ctx_data_t *vc = (vc_ctx_data_t*)data;
|
||||
@ -602,7 +592,7 @@ static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigne
|
||||
|
||||
if (!vc->eglBuffer[index] || !vc->vgimage[index])
|
||||
{
|
||||
vc->vgimage[index] = vgCreateImage(
|
||||
vc->vgimage[index] = vgCreateImage(
|
||||
rgb32 ? VG_sXRGB_8888 : VG_sRGB_565,
|
||||
vc->res,
|
||||
vc->res,
|
||||
@ -698,10 +688,7 @@ static uint32_t gfx_ctx_vc_get_flags(void *data)
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void gfx_ctx_vc_set_flags(void *data, uint32_t flags)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
static void gfx_ctx_vc_set_flags(void *data, uint32_t flags) { }
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_videocore = {
|
||||
gfx_ctx_vc_init,
|
||||
|
@ -56,12 +56,7 @@ typedef struct
|
||||
|
||||
static enum gfx_ctx_api xegl_api = GFX_CTX_NONE;
|
||||
|
||||
static int xegl_nul_handler(Display *dpy, XErrorEvent *event)
|
||||
{
|
||||
(void)dpy;
|
||||
(void)event;
|
||||
return 0;
|
||||
}
|
||||
static int xegl_nul_handler(Display *dpy, XErrorEvent *event) { return 0; }
|
||||
|
||||
static void gfx_ctx_xegl_destroy(void *data)
|
||||
{
|
||||
@ -468,8 +463,6 @@ static void gfx_ctx_xegl_input_driver(void *data,
|
||||
|
||||
static bool gfx_ctx_xegl_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
if (video_driver_display_type_get() != RARCH_DISPLAY_X11)
|
||||
return false;
|
||||
|
||||
@ -514,7 +507,6 @@ static bool gfx_ctx_xegl_bind_api(void *video_driver,
|
||||
|
||||
static void gfx_ctx_xegl_show_mouse(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
x11_show_mouse(g_x11_dpy, g_x11_win, state);
|
||||
}
|
||||
|
||||
@ -522,18 +514,9 @@ static void gfx_ctx_xegl_swap_buffers(void *data)
|
||||
{
|
||||
xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data;
|
||||
|
||||
switch (xegl_api)
|
||||
{
|
||||
case GFX_CTX_OPENGL_API:
|
||||
case GFX_CTX_OPENGL_ES_API:
|
||||
#ifdef HAVE_EGL
|
||||
egl_swap_buffers(&xegl->egl);
|
||||
egl_swap_buffers(&xegl->egl);
|
||||
#endif
|
||||
break;
|
||||
case GFX_CTX_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_ctx_xegl_bind_hw_render(void *data, bool enable)
|
||||
@ -549,18 +532,9 @@ static void gfx_ctx_xegl_set_swap_interval(void *data, int swap_interval)
|
||||
{
|
||||
xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data;
|
||||
|
||||
switch (xegl_api)
|
||||
{
|
||||
case GFX_CTX_OPENGL_API:
|
||||
case GFX_CTX_OPENGL_ES_API:
|
||||
#ifdef HAVE_EGL
|
||||
egl_set_swap_interval(&xegl->egl, swap_interval);
|
||||
egl_set_swap_interval(&xegl->egl, swap_interval);
|
||||
#endif
|
||||
break;
|
||||
case GFX_CTX_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol)
|
||||
|
Loading…
x
Reference in New Issue
Block a user