(Wayland) Buildfix

This commit is contained in:
twinaphex 2021-12-24 05:25:30 +01:00
parent c48d533950
commit 393e42a497

View File

@ -259,18 +259,21 @@ static int16_t input_wl_state(
case RETRO_DEVICE_MOUSE:
case RARCH_DEVICE_MOUSE_SCREEN:
{
bool state = false;
bool screen = device == RARCH_DEVICE_MOUSE_SCREEN;
if (port > 0) return 0; /* TODO: support mouse on additional ports */
if (port > 0)
return 0; /* TODO: support mouse on additional ports */
switch (id)
{
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
bool wheel_up = wl->mouse.wu;
state = wl->mouse.wu;
wl->mouse.wu = false;
return wheel_up;
return state;
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
bool wheel_down = wl->mouse.wd;
state = wl->mouse.wd;
wl->mouse.wd = false;
return wheel_down;
return state;
case RETRO_DEVICE_ID_MOUSE_X:
return screen ? wl->mouse.x : wl->mouse.delta_x;
case RETRO_DEVICE_ID_MOUSE_Y: