Scummvm 2.2.0 issue with touch screen [Solved]

Subforum for discussion and help with ScummVM's OpenPandora port

Moderator: ScummVM Team

b_o_b
Posts: 11
Joined: Tue Apr 19, 2022 5:23 pm

Scummvm 2.2.0 issue with touch screen [Solved]

Post by b_o_b »

Hi,

Not sure if the maintainer of the port is still around (DJWillis) but I've got an issue with touch screen. This issue seems to be introduced with releases after version 1.7
The problem happens with newer versions once you touch the screen outside the 'ScummVM screen', the black area's on the left or right. The only way to have it (kind of) working again is clicking the left upper edge and drag. Once you lose contact with the touchscreen it is not aligned anymore.
With nubs it works fine, but my nubs are terrible so I totally rely on the touch screen and ScummVM works so much better with touch screen anyway.
Also tried a dailybuild for the Pandora, it works (didn't expect that tbh :) ) but unfortunately has the same issue.

I also posted this on the pandora/pyra board: https://pyra-handheld.com/boards/thread ... -2-0.78566

Would be great if it can be fixed. I needed to go back to version 1.7 due to this problem but a lot has been improved and added since then.
Last edited by b_o_b on Mon Apr 25, 2022 10:17 am, edited 1 time in total.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

As noted on that forum, this is an issue in the SDL build for OpenPandora, but there is a workaround / hack fix applied in the OpenPandora backend for ScummVM: https://web.archive.org/web/20200810044 ... ng-issues/

<snip>
To fix the issue you need to get SDL to behave the same way with the SDL Cursor hidden as it does with it shown. The simplest way to do this is not hide the SDL Cursor, ok that’s not very helpful as it will give you a bog standard SDL Cursor printed over the top of your nice fancy cursor. What if you could hide the SDL Cursor without disabling it? Winking smile

Yep, the fix really is as simple as that, just leave the SDL Cursor enabled but use SDL_CreateCursor to create an empty transparent cursor. This way all you will see is your nice custom cursor but SDL internally will behave using the logic path for SDL_ShowCursor(SDL_ENABLE);
</snip>
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

b_o_b: This is pretty complex to fix, but possible. If this is not filed as a bug at bugs.scummvm.org, then please file this and add the details from here to avoid this being lost.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

I think the fix would need the OPGraphicsManager to override the SdlGraphicsManager::showMouse(bool) and notifyMousePosition methods as they both disable the cursor in some cases to avoid this in the OpenPandora build and then to add a if !defined(OPENPANDORA) guard to the disable of the SDL cursor in the shared SDL init function of platform/sdl/sdl.cpp ....
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

b_o_b : Have added some possible fix code as a Pull Request here: https://github.com/scummvm/scummvm/pull/3827

If you are able, please file a bug on bugs.scummvm.org for this and maybe try compiling the PR branch and test on your OpenPandora device to see if this
fixes your issue? viewtopic.php?t=14445 and https://wiki.scummvm.org/index.php?titl ... mVM/Docker may be of use to do that...
b_o_b
Posts: 11
Joined: Tue Apr 19, 2022 5:23 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by b_o_b »

digitall wrote: Wed Apr 20, 2022 12:38 am b_o_b : Have added some possible fix code as a Pull Request here: https://github.com/scummvm/scummvm/pull/3827

If you are able, please file a bug on bugs.scummvm.org for this and maybe try compiling the PR branch and test on your OpenPandora device to see if this
fixes your issue? viewtopic.php?t=14445 and https://wiki.scummvm.org/index.php?titl ... mVM/Docker may be of use to do that...

Thanks for your prompt reply! Created a ticket https://bugs.scummvm.org/ticket/13434#ticket
I can certainly test any PND thrown at me but probably will need too much assistance for compiling the PR branch. Will link this post to the openpandora forums as well though. Maybe Farox wants to give it a try.

If there is anything else I can do (as an end-user) let me know.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

b_o_b: Thanks for creating the ticket. I don't think we have an active OpenPandora maintainer, but the buildbot (automated builds) has a toolchain for OpenPandora so this is still supported by nightly builds. Can you please test the current nightly OP build to see if the automated builds work reasonably and that they do exhibit this problem?

The builds can be found here: https://buildbot.scummvm.org/#/dailybuilds specifically https://buildbot.scummvm.org/dailybuild ... 95.tar.bz2 for the current master branch build...
b_o_b
Posts: 11
Joined: Tue Apr 19, 2022 5:23 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by b_o_b »

Great idea! I wasn't aware it was already available without a review. Very easy for me to check that way if a change has solved it.

Installed it on a Pandora (april 21 version date is visible). Clicking outside the ScummVM screen still gives an offset
Pointing the stylus to the left upper edge of the ScummVM screen and dragging it to the middle of the screen kind of "re-calibrates" (not pixel perfect) the touchscreen. Then it works as long as I don't touch outside the ScummVM screen.
I have two Pandora's so I can compare both versions easily to see if any behavior changes - and unfortunately it didn't.

BTW - I don't even have to start a game to see the behavior. I tried vanilla installs and removed previous data.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

OK. Since we don't have an active OpenPandora porter, I will try merging the PR and if you can test to see if this fixes the issues.
b_o_b
Posts: 11
Joined: Tue Apr 19, 2022 5:23 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by b_o_b »

digitall wrote: Thu Apr 21, 2022 6:21 pm OK. Since we don't have an active OpenPandora porter, I will try merging the PR and if you can test to see if this fixes the issues.
Okay, so the change wasn't implemented yet. Still possible it will work then, let me know when it is up and I will test it.
Nice to see the buildbot still working and provides files that work.
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

Yes, I wanted to be sure that the build from the buildbot worked on a OpenPandora unit before I merged the PR... hence why I asked you to test.

The PR is now merged, so please test with the next nightly build from that page i.e. when the version updates from https://buildbot.scummvm.org/dailybuild ... 95.tar.bz2 ...
digitall
ScummVM Developer
Posts: 1177
Joined: Thu Aug 02, 2012 1:40 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by digitall »

b_o_b
Posts: 11
Joined: Tue Apr 19, 2022 5:23 pm

Re: Scummvm 2.2.0 issue with touch screen

Post by b_o_b »

digitall wrote: Fri Apr 22, 2022 10:10 am https://buildbot.scummvm.org/dailybuild ... c0.tar.bz2 is now available for testing :)
Tested and totally fixes the issue! I haven't checked a game yet - will do that later or might wait for the version Farox is currently compiling. Thanks!

I assume the daily build is not the preferred version and and better to use the last stable (after the fix)?
Post Reply