Opened 11 months ago

Last modified 2 months ago

#15737 new defect

TWP: Tap-to-click doesn't work for TWP with a Magic Trackpad 2

Reported by: dwatteau Owned by: scemino
Priority: normal Component: Engine: TWP
Version: Keywords: magic trackpad, trackpad
Cc: Game: Thimbleweed Park

Description

This is on macOS 13.7.3 (Intel x64), either with the official ScummVM 2.9.0 release, or with a daily build (2.10.0git13197-g3d1bce208c1).

Trying to play the GOG/1.0.958 release of Thimbleweed Park with my Magic Trackpad 2 causes the following behavior with ScummVM:

  • KO: the "tap-to-click" Magic Trackpad 2 setting is ignored by ScummVM for that game, meaning that I have to do a "long tap" whenever I want a click to be properly registered.

On the other hand, if I play Thimbleweed Park with its official interpreter, on the same machine with the same device, I see the following result:

  • OK: the "tap-to-click" behavior of the Magic Trackpad 2 works as expected, meaning that I can play the game just by tapping, which is very convenient for me

Also of note:

  • OK: The Magic Trackpad 2 is fine for playing other ScummVM titles. i.e. TWP appears to be the only ScummVM engine having an issue.
  • OK: Playing with a regular mouse is also fine with ScummVM and that game.

i.e. the only combination that currently fails is: ScummVM + TWP + Magic Trackpad 2 configured with "tap-to-click" setting.

Change History (7)

comment:1 by dwatteau, 10 months ago

Ah, it's actually not just related to the Magic Trackpad in particular; the same behavior happens with the built-in Touchpad of a MacBook Air M1, when configured for 'tap-to-click'.

So it's maybe easier to replicate this, knowing this, since Touchpads are more common than Magic Trackpad.

comment:2 by scemino, 7 months ago

I can't reproduce it on my MacBook with the "Tap to click" settings activated.
Do you know what makes it work with other game and not with TWP?

comment:3 by dwatteau, 7 months ago

Thanks. Did you try to use tap-to-click "as intended", i.e. whenever you want to make a "left click" you just tap the pad, very lightly (no force), for a very short time?

i.e. the problem won't happen if you enable tap-to-click but still use the pad as most PC pads (where you have to push the pad with some force, and for some time).

As for the engine difference, I don't know much, but I see that TWP has this unique _cursor.leftDownTime field. Maybe it could be related?

(Also, playing the iOS release on the same MacBook M1, the tap-to-click behavior is fine there.)

comment:4 by scemino, 7 months ago

Yes, I did the test “correctly”, because without this option enabled, I have to click until I hear the click, now I just have to put my finger down without pressure for the click to happen.

comment:5 by dwatteau, 7 months ago

@scemino: OK, thanks!

Strange that you can't reproduce it, I guess it's going to be "fun" to figure out what causes it :D You tried with both a custom build and with the automated daily builds? (in case it could be related to the SDL version or something.)

Here, I'm seeing the problem both with a Magic Trackpad 2 on macOS 13.7.6, and with the built-in Touchpad of a MacBook Air M1 running macOS 15.5. So I don't think it's related to the OS version, at least.

In case it could matter, here are the Touchpad settings on my M1:

$ defaults read com.apple.AppleMultitouchTrackpad
{
    ActuateDetents = 1;
    ActuationStrength = 0;
    Clicking = 1;
    DragLock = 0;
    Dragging = 0;
    FirstClickThreshold = 1;
    ForceSuppressed = 0;
    SecondClickThreshold = 1;
    TrackpadCornerSecondaryClick = 0;
    TrackpadFiveFingerPinchGesture = 2;
    TrackpadFourFingerHorizSwipeGesture = 2;
    TrackpadFourFingerPinchGesture = 2;
    TrackpadFourFingerVertSwipeGesture = 2;
    TrackpadHandResting = 1;
    TrackpadHorizScroll = 1;
    TrackpadMomentumScroll = 1;
    TrackpadPinch = 1;
    TrackpadRightClick = 1;
    TrackpadRotate = 1;
    TrackpadScroll = 1;
    TrackpadThreeFingerDrag = 1;
    TrackpadThreeFingerHorizSwipeGesture = 0;
    TrackpadThreeFingerTapGesture = 2;
    TrackpadThreeFingerVertSwipeGesture = 0;
    TrackpadTwoFingerDoubleTapGesture = 1;
    TrackpadTwoFingerFromRightEdgeSwipeGesture = 3;
    USBMouseStopsTrackpad = 0;
    UserPreferences = 1;
    version = 12;
}

and if there's debug trace that I could add/trigger in the backend or TWP code, to help figuring out what's happening, I'd be happy to do any test that could help.

comment:6 by dwatteau, 6 months ago

Here's something interesting: the engine for The Last Express has the same issue with tap-to-click.

It happens with both a pre-compiled daily build, or with my own local build (with SDL 2.32.8).

Other games on the same device (Curse of Monkey Island, Discworld, Simon the Sorcerer, Touché, AGS titles...) are fine, though.

comment:7 by scemino, 2 months ago

Here are my settings:
{

ActuateDetents = 1;
Clicking = 1;
DragLock = 0;
Dragging = 0;
FirstClickThreshold = 1;
ForceSuppressed = 0;
SecondClickThreshold = 1;
TrackpadCornerSecondaryClick = 0;
TrackpadFiveFingerPinchGesture = 2;
TrackpadFourFingerHorizSwipeGesture = 2;
TrackpadFourFingerPinchGesture = 2;
TrackpadFourFingerVertSwipeGesture = 2;
TrackpadHandResting = 1;
TrackpadHorizScroll = 1;
TrackpadMomentumScroll = 1;
TrackpadPinch = 1;
TrackpadRightClick = 1;
TrackpadRotate = 1;
TrackpadScroll = 1;
TrackpadThreeFingerDrag = 0;
TrackpadThreeFingerHorizSwipeGesture = 2;
TrackpadThreeFingerTapGesture = 0;
TrackpadThreeFingerVertSwipeGesture = 2;
TrackpadTwoFingerDoubleTapGesture = 1;
TrackpadTwoFingerFromRightEdgeSwipeGesture = 3;
USBMouseStopsTrackpad = 0;
UserPreferences = 1;
version = 12;

}

I tested with the last version: ScummVM 3.1.0git70-g66d199ba4f0 (Nov 19 2025 20:40:15)
It still works, but I noticed that I have to tap three times on the verbs for them to be selected.
I will have a look to the other engines to see the differences.

Note: See TracTickets for help on using tickets.