mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2025-02-17 05:38:28 +00:00
Filter out device types other than JOYPAD and MOUSE.
The device type is a bitmask, and a device can have multiple types, for example JOYPAD+ANALOG. Since we're only interested in JOYPAD and MOUSE here, just unset all others.
This commit is contained in:
parent
9142408648
commit
b4fb455fc6
@ -1729,6 +1729,10 @@ void retro_set_controller_port_device(unsigned in_port, unsigned device)
|
||||
if (in_port > 4)
|
||||
return;
|
||||
|
||||
// Filter out other device types, otherwise we can
|
||||
// accidentally skip devices like joypad+analog.
|
||||
device &= RETRO_DEVICE_JOYPAD | RETRO_DEVICE_MOUSE;
|
||||
|
||||
switch(device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
|
Loading…
x
Reference in New Issue
Block a user