mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Create RARCH_MENU_CTL_IS_SET_TEXTURE
This commit is contained in:
parent
841d6010a5
commit
d3bc47c6dc
@ -387,6 +387,10 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
case RARCH_MENU_CTL_UNSET_OWN_DRIVER:
|
||||
menu_driver_data_own = false;
|
||||
break;
|
||||
case RARCH_MENU_CTL_IS_SET_TEXTURE:
|
||||
if (!driver || !driver->menu_ctx)
|
||||
return false;
|
||||
return driver->menu_ctx->set_texture;
|
||||
case RARCH_MENU_CTL_OWNS_DRIVER:
|
||||
return menu_driver_data_own;
|
||||
case RARCH_MENU_CTL_DEINIT:
|
||||
|
@ -66,6 +66,7 @@ enum rarch_menu_ctl_state
|
||||
{
|
||||
RARCH_MENU_CTL_NONE = 0,
|
||||
RARCH_MENU_CTL_DEINIT,
|
||||
RARCH_MENU_CTL_IS_SET_TEXTURE,
|
||||
RARCH_MENU_CTL_SET_OWN_DRIVER,
|
||||
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
|
||||
RARCH_MENU_CTL_OWNS_DRIVER
|
||||
|
@ -826,13 +826,12 @@ static int menu_input_pointer(unsigned *action)
|
||||
unsigned fb_width, fb_height;
|
||||
int pointer_device, pointer_x, pointer_y;
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
menu_input_t *menu_input = menu_input_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
menu_input_t *menu_input = menu_input_get_ptr();
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_WIDTH, &fb_width);
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_HEIGHT, &fb_height);
|
||||
|
||||
pointer_device = driver->menu_ctx->set_texture?
|
||||
pointer_device = menu_driver_ctl(RARCH_MENU_CTL_IS_SET_TEXTURE, NULL) ?
|
||||
RETRO_DEVICE_POINTER : RARCH_DEVICE_POINTER_SCREEN;
|
||||
|
||||
menu_input->pointer.pressed[0] = input_driver_state(binds, 0, pointer_device,
|
||||
|
Loading…
x
Reference in New Issue
Block a user