Scummvm 2.2.0 issue with touch screen [Solved]
Moderator: ScummVM Team
Scummvm 2.2.0 issue with touch screen [Solved]
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.
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.
Re: Scummvm 2.2.0 issue with touch screen
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>
<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>
Re: Scummvm 2.2.0 issue with touch screen
The hack is here in the codebase:
https://github.com/scummvm/scummvm/comm ... 7133be5R45
https://github.com/scummvm/scummvm/comm ... 7133be5R45
Re: Scummvm 2.2.0 issue with touch screen
I think this regression was introduced by commit https://github.com/scummvm/scummvm/comm ... cae156R175 and compounded by https://github.com/scummvm/scummvm/comm ... 5bf854b523
Re: Scummvm 2.2.0 issue with touch screen
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.
Re: Scummvm 2.2.0 issue with touch screen
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 ....
Re: Scummvm 2.2.0 issue with touch screen
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...
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...
Re: Scummvm 2.2.0 issue with touch screen
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.
Re: Scummvm 2.2.0 issue with touch screen
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...
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...
Re: Scummvm 2.2.0 issue with touch screen
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.
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.
Re: Scummvm 2.2.0 issue with touch screen
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.
Re: Scummvm 2.2.0 issue with touch screen
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.
Re: Scummvm 2.2.0 issue with touch screen
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 ...
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 ...
Re: Scummvm 2.2.0 issue with touch screen
https://buildbot.scummvm.org/dailybuild ... c0.tar.bz2 is now available for testing
Re: Scummvm 2.2.0 issue with touch screen
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!digitall wrote: ↑Fri Apr 22, 2022 10:10 am https://buildbot.scummvm.org/dailybuild ... c0.tar.bz2 is now available for testing
I assume the daily build is not the preferred version and and better to use the last stable (after the fix)?