mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
(MUI) Attempt to fix the single click
This commit is contained in:
parent
b5323b65b1
commit
d5d0f580b0
@ -429,35 +429,21 @@ static int menu_input_pointer_post_iterate(
|
|||||||
return 0;
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
int16_t pointer_x = menu_input_pointer_state(MENU_POINTER_X_AXIS);
|
||||||
|
int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS);
|
||||||
|
|
||||||
if (menu_input->pointer.pressed[0])
|
if (menu_input->pointer.pressed[0])
|
||||||
{
|
{
|
||||||
gfx_ctx_metrics_t metrics;
|
gfx_ctx_metrics_t metrics;
|
||||||
float dpi;
|
float dpi;
|
||||||
static float accel0 = 0.0f;
|
static float accel0 = 0.0f;
|
||||||
static float accel1 = 0.0f;
|
static float accel1 = 0.0f;
|
||||||
int16_t pointer_x = menu_input_pointer_state(MENU_POINTER_X_AXIS);
|
|
||||||
int16_t pointer_y = menu_input_pointer_state(MENU_POINTER_Y_AXIS);
|
|
||||||
|
|
||||||
metrics.type = DISPLAY_METRIC_DPI;
|
metrics.type = DISPLAY_METRIC_DPI;
|
||||||
metrics.value = &dpi;
|
metrics.value = &dpi;
|
||||||
|
|
||||||
menu_input->pointer.counter++;
|
menu_input->pointer.counter++;
|
||||||
|
|
||||||
if (menu_input->pointer.counter == 1 &&
|
|
||||||
!menu_input_ctl(MENU_INPUT_CTL_IS_POINTER_DRAGGED, NULL))
|
|
||||||
{
|
|
||||||
menu_ctx_pointer_t point;
|
|
||||||
|
|
||||||
point.x = pointer_x;
|
|
||||||
point.y = pointer_y;
|
|
||||||
point.ptr = menu_input->pointer.ptr;
|
|
||||||
point.cbs = cbs;
|
|
||||||
point.entry = entry;
|
|
||||||
point.action = action;
|
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_POINTER_DOWN, &point);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pointer_oldpressed[0])
|
if (!pointer_oldpressed[0])
|
||||||
{
|
{
|
||||||
menu_input->pointer.accel = 0;
|
menu_input->pointer.accel = 0;
|
||||||
@ -522,10 +508,23 @@ static int menu_input_pointer_post_iterate(
|
|||||||
size_t selection = menu_navigation_get_selection();
|
size_t selection = menu_navigation_get_selection();
|
||||||
if (cbs && cbs->action_start)
|
if (cbs && cbs->action_start)
|
||||||
return menu_entry_action(entry, (unsigned)selection, MENU_ACTION_START);
|
return menu_entry_action(entry, (unsigned)selection, MENU_ACTION_START);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!menu_input_ctl(MENU_INPUT_CTL_IS_POINTER_DRAGGED, NULL))
|
||||||
|
{
|
||||||
|
menu_ctx_pointer_t point;
|
||||||
|
|
||||||
|
point.x = pointer_x;
|
||||||
|
point.y = pointer_y;
|
||||||
|
point.ptr = menu_input->pointer.ptr;
|
||||||
|
point.cbs = cbs;
|
||||||
|
point.entry = entry;
|
||||||
|
point.action = action;
|
||||||
|
|
||||||
|
menu_driver_ctl(RARCH_MENU_CTL_POINTER_DOWN, &point);
|
||||||
|
}
|
||||||
|
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_POINTER_UP, &point);
|
menu_driver_ctl(RARCH_MENU_CTL_POINTER_UP, &point);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_POINTER_TAP, &point);
|
menu_driver_ctl(RARCH_MENU_CTL_POINTER_TAP, &point);
|
||||||
ret = point.retcode;
|
ret = point.retcode;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user