Simplifications
This commit is contained in:
parent
f84da4b466
commit
77dde2a85c
|
@ -372,7 +372,8 @@ bool menu_driver_render(bool is_idle)
|
||||||
if (menu_driver_alive && !is_idle)
|
if (menu_driver_alive && !is_idle)
|
||||||
menu_display_libretro();
|
menu_display_libretro();
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_SET_TEXTURE, NULL);
|
if (menu_driver_ctx->set_texture)
|
||||||
|
menu_driver_ctx->set_texture();
|
||||||
|
|
||||||
menu_driver_data->state = 0;
|
menu_driver_data->state = 0;
|
||||||
|
|
||||||
|
@ -384,6 +385,13 @@ bool menu_driver_is_alive(void)
|
||||||
return menu_driver_alive;
|
return menu_driver_alive;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool menu_driver_is_texture_set(void)
|
||||||
|
{
|
||||||
|
if (!menu_driver_ctx)
|
||||||
|
return false;
|
||||||
|
return menu_driver_ctx->set_texture;
|
||||||
|
}
|
||||||
|
|
||||||
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
|
@ -521,14 +529,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||||
case RARCH_MENU_CTL_UNSET_OWN_DRIVER:
|
case RARCH_MENU_CTL_UNSET_OWN_DRIVER:
|
||||||
menu_driver_data_own = false;
|
menu_driver_data_own = false;
|
||||||
break;
|
break;
|
||||||
case RARCH_MENU_CTL_SET_TEXTURE:
|
|
||||||
if (menu_driver_ctx->set_texture)
|
|
||||||
menu_driver_ctx->set_texture();
|
|
||||||
break;
|
|
||||||
case RARCH_MENU_CTL_IS_SET_TEXTURE:
|
|
||||||
if (!menu_driver_ctx)
|
|
||||||
return false;
|
|
||||||
return menu_driver_ctx->set_texture;
|
|
||||||
case RARCH_MENU_CTL_OWNS_DRIVER:
|
case RARCH_MENU_CTL_OWNS_DRIVER:
|
||||||
return menu_driver_data_own;
|
return menu_driver_data_own;
|
||||||
case RARCH_MENU_CTL_DEINIT:
|
case RARCH_MENU_CTL_DEINIT:
|
||||||
|
|
|
@ -100,12 +100,10 @@ enum rarch_menu_ctl_state
|
||||||
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
RARCH_MENU_CTL_SET_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_UNSET_PREVENT_POPULATE,
|
RARCH_MENU_CTL_UNSET_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_IS_PREVENT_POPULATE,
|
RARCH_MENU_CTL_IS_PREVENT_POPULATE,
|
||||||
RARCH_MENU_CTL_SET_TEXTURE,
|
|
||||||
RARCH_MENU_CTL_IS_TOGGLE,
|
RARCH_MENU_CTL_IS_TOGGLE,
|
||||||
RARCH_MENU_CTL_SET_TOGGLE,
|
RARCH_MENU_CTL_SET_TOGGLE,
|
||||||
RARCH_MENU_CTL_UNSET_TOGGLE,
|
RARCH_MENU_CTL_UNSET_TOGGLE,
|
||||||
RARCH_MENU_CTL_DESTROY,
|
RARCH_MENU_CTL_DESTROY,
|
||||||
RARCH_MENU_CTL_IS_SET_TEXTURE,
|
|
||||||
RARCH_MENU_CTL_SET_OWN_DRIVER,
|
RARCH_MENU_CTL_SET_OWN_DRIVER,
|
||||||
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
|
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
|
||||||
RARCH_MENU_CTL_OWNS_DRIVER,
|
RARCH_MENU_CTL_OWNS_DRIVER,
|
||||||
|
@ -400,6 +398,8 @@ void menu_driver_set_binding_state(bool on);
|
||||||
|
|
||||||
void menu_driver_frame(video_frame_info_t *video_info);
|
void menu_driver_frame(video_frame_info_t *video_info);
|
||||||
|
|
||||||
|
bool menu_driver_is_texture_set(void);
|
||||||
|
|
||||||
bool menu_driver_is_alive(void);
|
bool menu_driver_is_alive(void);
|
||||||
|
|
||||||
extern menu_ctx_driver_t menu_ctx_xui;
|
extern menu_ctx_driver_t menu_ctx_xui;
|
||||||
|
|
|
@ -47,9 +47,9 @@ static int menu_event_pointer(unsigned *action)
|
||||||
unsigned fb_width, fb_height;
|
unsigned fb_width, fb_height;
|
||||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||||
menu_input_t *menu_input = menu_input_get_ptr();
|
menu_input_t *menu_input = menu_input_get_ptr();
|
||||||
int pointer_device =
|
int pointer_device = menu_driver_is_texture_set()
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_IS_SET_TEXTURE, NULL) ?
|
?
|
||||||
RETRO_DEVICE_POINTER : RARCH_DEVICE_POINTER_SCREEN;
|
RETRO_DEVICE_POINTER : RARCH_DEVICE_POINTER_SCREEN;
|
||||||
|
|
||||||
menu_display_get_fb_size(&fb_width, &fb_height,
|
menu_display_get_fb_size(&fb_width, &fb_height,
|
||||||
&fb_pitch);
|
&fb_pitch);
|
||||||
|
|
Loading…
Reference in New Issue