Incorrect stylus handling in the SCI engine

Subforum for discussion and help with ScummVM's GP2X, GP2X Wiz and Caanoo ports

Moderator: ScummVM Team

Post Reply
User avatar
Posts: 16
Joined: Wed Nov 10, 2010 10:25 pm

Incorrect stylus handling in the SCI engine

Post by surdules » Mon Nov 15, 2010 4:35 am

I think there is a bug with the way the stylus is handled on the Caanoo, in SCI games. Specifically:

1. Launch some SCI game, say Space Quest 1 VGA
2. Move the mouse somewhere on the screen with the joystick
3. Click with the stylus somewhere else on the screen

You'll notice that the engine registers the click where the mouse was left via the joystick, even if the stylus click was in a totally different spot on the screen.

I think the bug is related to the code at line 147 in sci/event.cpp where all mouse-move events are ignored, and only mouse down/up events are handled. On a PC (or some other device with "continuous" mouse movement) this is not a problem, since the click will always register where the mouse cursor last was; but on devices with styluses/touch interfaces, it's possible to move the mouse somewhere and click entirely somewhere else.

This problem seems to be specific to the SCI engine -- the Scumm engine works fine (and the code seems to be fine as well, since it handles both movement and click-type events).

I'm not terribly familiar with the ScummVM source -- can someone more familiar confirm if this is indeed the case?

Also, are there instructions anywhere for how to build this code for the Caanoo? I'd like to play with the code a little and test this theory, but not sure how to get started.



User avatar
ScummVM Porter
Posts: 174
Joined: Wed Oct 26, 2005 8:55 pm

Post by DJWillis » Mon Nov 22, 2010 2:32 pm

Thanks for the report, looking into it.

Post Reply