[Scummvm-tracker] [ScummVM :: Bugs] #11711: BACKENDS: Android (Amazon Fire HD8/2020) - Touchpad mode issue ("mouse mode" not working, stuck in "direct mode")
ScummVM :: Bugs
trac at scummvm.org
Wed Sep 7 04:27:25 UTC 2022
#11711: BACKENDS: Android (Amazon Fire HD8/2020) - Touchpad mode issue ("mouse
mode" not working, stuck in "direct mode")
-------------------------------------------+----------------------------
Reporter: Expello | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Port: Android
Version: | Resolution:
Keywords: amazon fire hd 8 touchpad mode | Game:
-------------------------------------------+----------------------------
Comment (by jacobhyman):
It looks like the check to see if the event came from a stylus
[[https://github.com/scummvm/scummvm/blob/master/backends/platform/android/org/scummvm/scummvm/MouseHelper.java#L114|here]]
has a problem. According to the Android
[[https://developer.android.com/reference/android/view/InputDevice#SOURCE_STYLUS|InputDevice
documentation]], SOURCE_STYLUS "merely indicates that an input device is
capable of obtaining input from a stylus." So what is happening is that
if the device reports it is capable of using a stylus, all touch input is
being treated as mouse input.
It appears the fix to check for stylus input is to instead check the tool
type returned by MotionEvent#getToolType(int). I wrote a small test app
and confirmed that for touch events the Fire HD8 (2020) tablet has the
InputDevice flag for SOURCE_STYLUS always set. I also confirmed that
checking the ToolType of a touch screen event returned TOOL_TYPE_FINGER
and not TOOL_TYPE_STYLUS. I don't think this is specific to Fire tablets;
I was able to reproduce it on an emulated device, but I don't have any
other real tablets.
--
Ticket URL: <https://bugs.scummvm.org/ticket/11711#comment:5>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list