mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
a3e4a7612f
Oops! Didn't do this quite right the first time round. This commit fixes RETRO_DEVICE_ID_POINTER_PRESSED, which would always return 0 due to to an implicit case to int16_t. Basically, we'd do (val & 0x00080000) & 0xFFFF; which would return 0 every time. Fixed that by wrapping it in a ternary. Yes, I know we could use a rotation, but for a boolean value it really doesn't matter. I also rewrote scaleTP to deal entirely in integers. While the floating-point math was theoretically faster on PowerPC; it gets awkward to cast -0x7FFF to a float. Speaking of, the driver now actually conforms to the libretro API. Not sure how I managed to not see the spec; but hey, now its fixed. RETRO_DEVICE_POINTER_ID_X/Y will now return values between -0x7FFF and 0x7FFF like they're supposed to. Big thanks to @r-type for hounding me to fix this. Partially addresses #5294; we still need mouse emulation.