Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#11904 closed defect (fixed)

BACKENDS: Android: Mouse pointer control with analog joystick is unusable

Reported by: ellinge Owned by: antoniou79
Priority: normal Component: Port: Android
Version: Keywords: joystick mouse stick
Cc: Game:

Description (last modified by ellinge)

I’ve compared the behaviour between ScummVM 2.0 (Google Play Store) and ScummVM 2.2 (sideloaded from scummvm.org) and it seems as if a regression bug has appeared which was fixed earlier in:
https://bugs.scummvm.org/ticket/6996

The mouse only moves if you use a left joystick which continuously outputs an axis change even when ”idle”.

To be fair the ScummVM 2.0 had issues as well with my Retroid Pocket 2. It did not stop when returning the left joystick to center but perhaps I need to change some additional setting for that. It stopped if I used the DPAD to move the mouse instead.

In ScummVM 2.1+ however the mouse stops as soon as my left stick is ”idle” (no new axis events even if ”in use”) which gives a feeling of lag or stutter.

The files involved in the earlier ”fix” seems to have been deprecated in this commit.

Attachments (4)

leftstick.mp4 (622.5 KB ) - added by ellinge 4 years ago.
events.mp4 (640.7 KB ) - added by ellinge 4 years ago.
Sixaxis.mp4 (1.8 MB ) - added by ellinge 4 years ago.
left_stick_latest_stable.mp4 (1.0 MB ) - added by ellinge 4 years ago.

Change History (13)

comment:1 by ellinge, 4 years ago

Description: modified (diff)

by ellinge, 4 years ago

Attachment: leftstick.mp4 added

by ellinge, 4 years ago

Attachment: events.mp4 added

comment:2 by raziel-, 4 years ago

Summary: Android: Mouse pointer control with analog joystick is unusableBACKENDS: Android: Mouse pointer control with analog joystick is unusable

comment:3 by antoniou79, 4 years ago

I am a bit confused about the issue and the details pertaining to it. I am also not in possession of a controller that can connect to my android devices (I own only last gen controllers, ie Xbox 360 and PS3), and so far the only joystick I have to test with is an actual USB joystick :D from Saitek (!) from back in the early '00s.

Could you clarify:

  • What is the controller that you are using?
  • Can you elaborate a bit more on the issue with the mouse control specifically in the 2.2 series?

by ellinge, 4 years ago

Attachment: Sixaxis.mp4 added

comment:4 by ellinge, 4 years ago

So I tried with the PS3 controller as well and it seems to behave the same way. Scummvm seems to wait on an update event of the current position but it stops sending one as soon as you are idle with the stick. This cause the cursor to stop with the last event instead of moving until receiving an event that the stick has returned to center (0/0) (or moving in a new delta/direction).

I’ve a attached a video showing both the Retroid:s and PS3:s left stick behaviour.
https://bugs.scummvm.org/attachment/ticket/11904/Sixaxis.mp4

Last edited 4 years ago by ellinge (previous) (diff)

comment:5 by ellinge, 4 years ago

I can’t find my wireless receiver (usb) for the 360 controllers unfortunentely and did not find a way to pair it with the charging cables.

comment:6 by antoniou79, 4 years ago

I think I understand the issue.
I've tried to fix it, but I am unsure this is the best way to go about it.
Anyway, the fix should appear on the developer builds by tomorrow if all goes well.

As I said, I can only test with a USB device that is an analogue joystick (not a gamepad).

I can think of quite a few stuff to optimize or rework for controller support, but those can be done in the future -- or by another developer who owns such controllers and can test more quickly!

Let me know if the issue has been fixed or improved with the new development build

by ellinge, 4 years ago

comment:7 by ellinge, 4 years ago

Version 0, edited 4 years ago by ellinge (next)

comment:8 by antoniou79, 4 years ago

Owner: set to antoniou79
Resolution: fixed
Status: newclosed

Nice, thanks for the feedback.

Closing this as fixed by commit
https://github.com/scummvm/scummvm/commit/64eb1c0afe0bd8af9cf331b8ec62c0c6eee927d2

comment:9 by ellinge, 4 years ago

Any idea when it’s included in a release build?

Note: See TracTickets for help on using tickets.