This commit is contained in:
twinaphex 2020-07-17 00:59:20 +02:00
parent 318d5490cd
commit be1e245396
4 changed files with 11 additions and 61 deletions

View File

@ -635,10 +635,7 @@ static uint32_t android_gfx_ctx_get_flags(void *data)
return flags; return flags;
} }
static void android_gfx_ctx_set_flags(void *data, uint32_t flags) static void android_gfx_ctx_set_flags(void *data, uint32_t flags) { }
{
(void)flags;
}
const gfx_ctx_driver_t gfx_ctx_android = { const gfx_ctx_driver_t gfx_ctx_android = {
android_gfx_ctx_init, android_gfx_ctx_init,

View File

@ -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, static void gfx_ctx_drm_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height) bool *resize, unsigned *width, unsigned *height)
{ {
(void)data;
(void)width;
(void)height;
*resize = false; *resize = false;
*quit = (bool)frontend_driver_get_signal_handler_state(); *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, static void drm_flip_handler(int fd, unsigned frame,
unsigned sec, unsigned usec, void *data) unsigned sec, unsigned usec, void *data)
{ {
(void)fd;
(void)sec;
(void)usec;
#if 0 #if 0
static unsigned first_page_flip; static unsigned first_page_flip;
static unsigned last_page_flip; static unsigned last_page_flip;

View File

@ -487,23 +487,12 @@ static void gfx_ctx_vc_input_driver(void *data,
*input_data = NULL; *input_data = NULL;
} }
static bool gfx_ctx_vc_has_focus(void *data) 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; }
(void)data;
return g_egl_inited;
}
static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable)
{
(void)data;
(void)enable;
return false;
}
static float gfx_ctx_vc_translate_aspect(void *data, static float gfx_ctx_vc_translate_aspect(void *data,
unsigned width, unsigned height) unsigned width, unsigned height)
{ {
(void)data;
/* Check for SD televisions: they should always be 4:3. */ /* Check for SD televisions: they should always be 4:3. */
if ((width == 640 || width == 720) && (height == 480 || height == 576)) if ((width == 640 || width == 720) && (height == 480 || height == 576))
return 4.0f / 3.0f; return 4.0f / 3.0f;
@ -587,8 +576,9 @@ fail:
return false; return false;
} }
static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigned width, static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame,
unsigned height, unsigned pitch, bool rgb32, unsigned index, void **image_handle) unsigned width, unsigned height,
unsigned pitch, bool rgb32, unsigned index, void **image_handle)
{ {
bool ret = false; bool ret = false;
vc_ctx_data_t *vc = (vc_ctx_data_t*)data; 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]) if (!vc->eglBuffer[index] || !vc->vgimage[index])
{ {
vc->vgimage[index] = vgCreateImage( vc->vgimage[index] = vgCreateImage(
rgb32 ? VG_sXRGB_8888 : VG_sRGB_565, rgb32 ? VG_sXRGB_8888 : VG_sRGB_565,
vc->res, vc->res,
vc->res, vc->res,
@ -698,10 +688,7 @@ static uint32_t gfx_ctx_vc_get_flags(void *data)
return flags; return flags;
} }
static void gfx_ctx_vc_set_flags(void *data, uint32_t flags) static void gfx_ctx_vc_set_flags(void *data, uint32_t flags) { }
{
(void)data;
}
const gfx_ctx_driver_t gfx_ctx_videocore = { const gfx_ctx_driver_t gfx_ctx_videocore = {
gfx_ctx_vc_init, gfx_ctx_vc_init,

View File

@ -56,12 +56,7 @@ typedef struct
static enum gfx_ctx_api xegl_api = GFX_CTX_NONE; static enum gfx_ctx_api xegl_api = GFX_CTX_NONE;
static int xegl_nul_handler(Display *dpy, XErrorEvent *event) static int xegl_nul_handler(Display *dpy, XErrorEvent *event) { return 0; }
{
(void)dpy;
(void)event;
return 0;
}
static void gfx_ctx_xegl_destroy(void *data) 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) static bool gfx_ctx_xegl_suppress_screensaver(void *data, bool enable)
{ {
(void)data;
if (video_driver_display_type_get() != RARCH_DISPLAY_X11) if (video_driver_display_type_get() != RARCH_DISPLAY_X11)
return false; 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) static void gfx_ctx_xegl_show_mouse(void *data, bool state)
{ {
(void)data;
x11_show_mouse(g_x11_dpy, g_x11_win, state); 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; 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 #ifdef HAVE_EGL
egl_swap_buffers(&xegl->egl); egl_swap_buffers(&xegl->egl);
#endif #endif
break;
case GFX_CTX_NONE:
default:
break;
}
} }
static void gfx_ctx_xegl_bind_hw_render(void *data, bool enable) 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; 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 #ifdef HAVE_EGL
egl_set_swap_interval(&xegl->egl, swap_interval); egl_set_swap_interval(&xegl->egl, swap_interval);
#endif #endif
break;
case GFX_CTX_NONE:
default:
break;
}
} }
static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol) static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol)