mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Implement MENU_POINTER_PRESSED
This commit is contained in:
parent
1217e92e8d
commit
cdfc2ffd59
@ -232,7 +232,7 @@ static int16_t zarch_zui_input_state(enum zarch_zui_input_state state)
|
|||||||
case MENU_ZARCH_Y:
|
case MENU_ZARCH_Y:
|
||||||
break;
|
break;
|
||||||
case MENU_ZARCH_PRESSED:
|
case MENU_ZARCH_PRESSED:
|
||||||
if (menu_input_mouse_state(MENU_MOUSE_LEFT_BUTTON))
|
if (menu_input_mouse_state(MENU_MOUSE_LEFT_BUTTON) || menu_input_pointer_state(MENU_POINTER_PRESSED))
|
||||||
return 1;
|
return 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -387,6 +387,8 @@ static void zarch_zui_snow(zui_t *zui)
|
|||||||
p->x += zarch_zui_scalef(mouse_x, 0, zui->width, -0.3, 0.3) + p->xspeed;
|
p->x += zarch_zui_scalef(mouse_x, 0, zui->width, -0.3, 0.3) + p->xspeed;
|
||||||
|
|
||||||
p->alive = p->y >= 0 && p->y < (int)zui->height && p->x >= 0 && p->x < (int)zui->width;
|
p->alive = p->y >= 0 && p->y < (int)zui->height && p->x >= 0 && p->x < (int)zui->width;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (max_gen > 0 && timeout <= 0)
|
else if (max_gen > 0 && timeout <= 0)
|
||||||
{
|
{
|
||||||
|
@ -1038,6 +1038,8 @@ int16_t menu_input_pointer_state(enum menu_input_pointer_state state)
|
|||||||
return menu->pointer.dx;
|
return menu->pointer.dx;
|
||||||
case MENU_POINTER_DELTA_Y_AXIS:
|
case MENU_POINTER_DELTA_Y_AXIS:
|
||||||
return menu->pointer.dy;
|
return menu->pointer.dy;
|
||||||
|
case MENU_POINTER_PRESSED:
|
||||||
|
return menu->pointer.pressed[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -62,7 +62,8 @@ enum menu_input_pointer_state
|
|||||||
MENU_POINTER_X_AXIS = 0,
|
MENU_POINTER_X_AXIS = 0,
|
||||||
MENU_POINTER_Y_AXIS,
|
MENU_POINTER_Y_AXIS,
|
||||||
MENU_POINTER_DELTA_X_AXIS,
|
MENU_POINTER_DELTA_X_AXIS,
|
||||||
MENU_POINTER_DELTA_Y_AXIS
|
MENU_POINTER_DELTA_Y_AXIS,
|
||||||
|
MENU_POINTER_PRESSED
|
||||||
};
|
};
|
||||||
|
|
||||||
enum menu_input_mouse_state
|
enum menu_input_mouse_state
|
||||||
|
Loading…
x
Reference in New Issue
Block a user