mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Remove gfx_display_{set/get}_driver_id
This commit is contained in:
parent
3e55f067ed
commit
14c9ccfda8
@ -253,19 +253,6 @@ static bool gfx_display_check_compatibility(
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void gfx_display_set_driver_id(enum menu_driver_id_type type)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
p_disp->menu_driver_id = type;
|
||||
}
|
||||
|
||||
enum menu_driver_id_type gfx_display_get_driver_id(void)
|
||||
{
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
return p_disp->menu_driver_id;
|
||||
}
|
||||
|
||||
static float gfx_display_get_dpi_scale_internal(unsigned width, unsigned height)
|
||||
{
|
||||
float dpi;
|
||||
|
@ -338,10 +338,6 @@ bool gfx_display_reset_textures_list_buffer(
|
||||
int gfx_display_osk_ptr_at_pos(void *data, int x, int y,
|
||||
unsigned width, unsigned height);
|
||||
|
||||
enum menu_driver_id_type gfx_display_get_driver_id(void);
|
||||
|
||||
void gfx_display_set_driver_id(enum menu_driver_id_type type);
|
||||
|
||||
float gfx_display_get_dpi_scale(unsigned width, unsigned height);
|
||||
|
||||
float gfx_display_get_widget_dpi_scale(
|
||||
|
@ -823,7 +823,9 @@ void gfx_widgets_iterate(
|
||||
* factor have changed */
|
||||
float scale_factor = 0.0f;
|
||||
#ifdef HAVE_XMB
|
||||
if (gfx_display_get_driver_id() == MENU_DRIVER_ID_XMB)
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
enum menu_driver_id_type type = p_disp->menu_driver_id;
|
||||
if (type == MENU_DRIVER_ID_XMB)
|
||||
scale_factor = gfx_display_get_widget_pixel_scale(width, height, fullscreen);
|
||||
else
|
||||
#endif
|
||||
@ -1900,7 +1902,9 @@ static void gfx_widgets_context_reset(
|
||||
p_dispwidget->last_video_width = width;
|
||||
p_dispwidget->last_video_height = height;
|
||||
#ifdef HAVE_XMB
|
||||
if (gfx_display_get_driver_id() == MENU_DRIVER_ID_XMB)
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
enum menu_driver_id_type type = p_disp->menu_driver_id;
|
||||
if (type == MENU_DRIVER_ID_XMB)
|
||||
p_dispwidget->last_scale_factor = gfx_display_get_widget_pixel_scale(
|
||||
p_dispwidget->last_video_width,
|
||||
p_dispwidget->last_video_height, fullscreen);
|
||||
|
22
retroarch.c
22
retroarch.c
@ -6772,8 +6772,9 @@ bool menu_driver_list_cache(menu_ctx_list_t *list)
|
||||
static void menu_driver_set_id(struct rarch_state *p_rarch)
|
||||
{
|
||||
const char *driver_name = NULL;
|
||||
gfx_display_t *p_disp = &p_rarch->dispgfx;
|
||||
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_UNKNOWN);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_UNKNOWN;
|
||||
|
||||
if (!p_rarch->menu_driver_ctx || !p_rarch->menu_driver_ctx->ident)
|
||||
return;
|
||||
@ -6784,17 +6785,15 @@ static void menu_driver_set_id(struct rarch_state *p_rarch)
|
||||
return;
|
||||
|
||||
if (string_is_equal(driver_name, "rgui"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_RGUI);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_RGUI;
|
||||
else if (string_is_equal(driver_name, "ozone"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_OZONE);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_OZONE;
|
||||
else if (string_is_equal(driver_name, "glui"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_GLUI);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_GLUI;
|
||||
else if (string_is_equal(driver_name, "xmb"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_XMB);
|
||||
else if (string_is_equal(driver_name, "xui"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_XUI);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_XMB;
|
||||
else if (string_is_equal(driver_name, "stripes"))
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_STRIPES);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_STRIPES;
|
||||
}
|
||||
|
||||
static bool generic_menu_init_list(void *data)
|
||||
@ -6866,6 +6865,7 @@ static bool menu_driver_init_internal(
|
||||
bool menu_driver_init(bool video_is_threaded)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
gfx_display_t *p_disp = &p_rarch->dispgfx;
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
|
||||
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
|
||||
@ -6885,7 +6885,7 @@ bool menu_driver_init(bool video_is_threaded)
|
||||
|
||||
/* If driver initialisation failed, must reset
|
||||
* driver id to 'unknown' */
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_UNKNOWN);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_UNKNOWN;
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -7586,6 +7586,7 @@ static bool driver_ctl_find_index(driver_ctx_info_t *drv)
|
||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
gfx_display_t *p_disp = &p_rarch->dispgfx;
|
||||
struct menu_state *menu_st = &p_rarch->menu_driver_state;
|
||||
|
||||
switch (state)
|
||||
@ -7683,8 +7684,7 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
if (p_rarch->menu_userdata)
|
||||
free(p_rarch->menu_userdata);
|
||||
p_rarch->menu_userdata = NULL;
|
||||
|
||||
gfx_display_set_driver_id(MENU_DRIVER_ID_UNKNOWN);
|
||||
p_disp->menu_driver_id = MENU_DRIVER_ID_UNKNOWN;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
if (frontend_driver_has_fork())
|
||||
|
Loading…
x
Reference in New Issue
Block a user