mirror of
https://github.com/libretro/RetroArch
synced 2025-03-25 16:44:01 +00:00
(DRM) Cleanups
This commit is contained in:
parent
750140779c
commit
ed9d40caa2
@ -810,22 +810,11 @@ static void gfx_ctx_drm_input_driver(void *data,
|
|||||||
*input_data = NULL;
|
*input_data = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gfx_ctx_drm_has_focus(void *data)
|
static bool gfx_ctx_drm_has_focus(void *data) { return true; }
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_drm_suppress_screensaver(void *data, bool enable)
|
static bool gfx_ctx_drm_suppress_screensaver(void *data, bool enable) { return false; }
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)enable;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
static enum gfx_ctx_api gfx_ctx_drm_get_api(void *data)
|
static enum gfx_ctx_api gfx_ctx_drm_get_api(void *data) { return drm_api; }
|
||||||
{
|
|
||||||
return drm_api;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_drm_bind_api(void *video_driver,
|
static bool gfx_ctx_drm_bind_api(void *video_driver,
|
||||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
||||||
|
@ -68,8 +68,6 @@
|
|||||||
#define EGL_PLATFORM_GBM_KHR 0x31D7
|
#define EGL_PLATFORM_GBM_KHR 0x31D7
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static enum gfx_ctx_api drm_api = GFX_CTX_NONE;
|
|
||||||
|
|
||||||
typedef struct gfx_ctx_go2_drm_data
|
typedef struct gfx_ctx_go2_drm_data
|
||||||
{
|
{
|
||||||
#ifdef HAVE_EGL
|
#ifdef HAVE_EGL
|
||||||
@ -85,9 +83,19 @@ typedef struct gfx_ctx_go2_drm_data
|
|||||||
bool core_hw_context_enable;
|
bool core_hw_context_enable;
|
||||||
} gfx_ctx_go2_drm_data_t;
|
} gfx_ctx_go2_drm_data_t;
|
||||||
|
|
||||||
static unsigned native_width = 480;
|
static enum gfx_ctx_api drm_api = GFX_CTX_NONE;
|
||||||
|
|
||||||
|
/* TODO/FIXME - global variable */
|
||||||
|
int ss = 0;
|
||||||
|
|
||||||
|
|
||||||
|
static unsigned native_width = 480;
|
||||||
static unsigned native_height = 320;
|
static unsigned native_height = 320;
|
||||||
|
|
||||||
|
/* Function callback */
|
||||||
|
void (*swap_buffers)(void*);
|
||||||
|
|
||||||
|
|
||||||
static void gfx_ctx_go2_drm_input_driver(void *data,
|
static void gfx_ctx_go2_drm_input_driver(void *data,
|
||||||
const char *joypad_name,
|
const char *joypad_name,
|
||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
@ -157,10 +165,7 @@ static void gfx_ctx_go2_drm_destroy(void *data)
|
|||||||
drm->display = NULL;
|
drm->display = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static enum gfx_ctx_api gfx_ctx_go2_drm_get_api(void *data)
|
static enum gfx_ctx_api gfx_ctx_go2_drm_get_api(void *data) { return drm_api; }
|
||||||
{
|
|
||||||
return drm_api;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_go2_drm_bind_api(void *video_driver,
|
static bool gfx_ctx_go2_drm_bind_api(void *video_driver,
|
||||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
||||||
@ -274,16 +279,17 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data,
|
|||||||
static void gfx_ctx_go2_drm_check_window(void *data, bool *quit,
|
static void gfx_ctx_go2_drm_check_window(void *data, bool *quit,
|
||||||
bool *resize, unsigned *width, unsigned *height)
|
bool *resize, unsigned *width, unsigned *height)
|
||||||
{
|
{
|
||||||
gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data;
|
unsigned w;
|
||||||
struct retro_system_av_info* av_info = video_viewport_get_system_av_info();
|
unsigned h;
|
||||||
|
gfx_ctx_go2_drm_data_t
|
||||||
|
*drm = (gfx_ctx_go2_drm_data_t*)data;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool use_ctx_scaling = settings->bools.video_ctx_scaling;
|
bool use_ctx_scaling = settings->bools.video_ctx_scaling;
|
||||||
|
|
||||||
unsigned w;
|
|
||||||
unsigned h;
|
|
||||||
|
|
||||||
if (use_ctx_scaling && !menu_driver_is_alive())
|
if (use_ctx_scaling && !menu_driver_is_alive())
|
||||||
{
|
{
|
||||||
|
struct retro_system_av_info*
|
||||||
|
av_info = video_viewport_get_system_av_info();
|
||||||
w = av_info->geometry.base_width;
|
w = av_info->geometry.base_width;
|
||||||
h = av_info->geometry.base_height;
|
h = av_info->geometry.base_height;
|
||||||
}
|
}
|
||||||
@ -303,21 +309,9 @@ static void gfx_ctx_go2_drm_check_window(void *data, bool *quit,
|
|||||||
*quit = (bool)frontend_driver_get_signal_handler_state();
|
*quit = (bool)frontend_driver_get_signal_handler_state();
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool gfx_ctx_go2_drm_has_focus(void *data)
|
static bool gfx_ctx_go2_drm_has_focus(void *data) { return true; }
|
||||||
{
|
static bool gfx_ctx_go2_drm_suppress_screensaver(void *data, bool enable) { return false; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
static bool gfx_ctx_go2_drm_suppress_screensaver(void *data, bool enable)
|
|
||||||
{
|
|
||||||
(void)data;
|
|
||||||
(void)enable;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
int ss = 0;
|
|
||||||
|
|
||||||
void (*swap_buffers)(void*);
|
|
||||||
static void gfx_ctx_go2_drm_swap_buffers(void *data)
|
static void gfx_ctx_go2_drm_swap_buffers(void *data)
|
||||||
{
|
{
|
||||||
gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data;
|
gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user