Windows 7 and Touchscreen

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Windows 7 and Touchscreen

Post by lmsilva »

Dear all,

I recently bought a touchscreen kit for my arcade and was very excited about being able to play ScummVM games using the touchscreen instead of the mouse.

Now that I've installed the kit, I noticed that, although the mouse works as expected in Windows and in Windows native apps, I have trouble using it inside games (not only ScummVM but also Popcap games). So this is more of a general question as I was hoping someone could point me in the right direction...

When I boot up the game, I can see that Windows, apparently, detects my touch screen movements exactly where I touched BUT the mouse pointer disappears...

If I start moving my finger around the screen, I can sometimes see the pointer is moving close to the edges of the screen...

Any idea on what might be happening? I'm having a REALLY hard time finding information on this...

I found some references to how ScummVM does not have touchscreen support (though some ports do, like the Android and Nintendo DS ones). And I also found someone saying that "things seem to get better when using normal2x or even normal3x" (though I haven't had the chance to try it out yet)...

Based on that comment on the normal2x AND seeing that the pointer moves to the edges of the screen, I suspect that Windows "gets confused" when we calibrate the screen at a certain definition (e.g. 1920x1080) and then a game goes fullscreen and changes the definition to something lower (e.g. 1024x768). Could that be the case? And, if so, how can I make ScummVM boot up in the same definition as my screen (if it doesn't by default when entering full screen mode?)

As a side note, I also noticed someone recompiled libSDL to be able to use the touchscreen as a touchpad. I haven't tried it yet but was really curious about "why make it a touchpad?" instead of simply detecting where we are pressing and repositioning the mouse pointer to that place? (especially if some of the scummvm ports do support point interfaces).

Absolute worst case scenario, I'm willing to try and mess with the code to try and recompile my own version to fix this (although I would rather not have to as I'm fairly sure there is a huge learning curve :o) and I don't really want to turn my arcade into a dev box heheh).

Thank you very much!
Luis
digitall
ScummVM Developer
Posts: 1185
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

See here for previous discussion about using Touchscreens with the Win32 port:
http://forums.scummvm.org/viewtopic.php ... ouchscreen
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Post by lmsilva »

Thanks for sharing that, I had actually already skimmed through it but didn't find anything similar to what I'm encountering...

I did some more debugging and here's what I found:
- while in windowed mode, the touch screen works as I expect it to!
- if I turn to fullscreen mode, the pointer starts acting crazy...

I tried to record a video to show what is happening...it is very crappy but, hopefully, it should allow you guys to better understand the problem I'm experiencing:
www. youtube .com/watch?v=oYvaJZCPROg&feature=youtu.be&hd=1
(add to mask the url so I wouldn't be flagged as a spammer by the forum, sorry about that)...

Ignore the blue dot and yellow circle, that's the video app tracking "the mouse" (I didn't actually click those places)...

Anyway, in this video, I was just trying to click take action on the door. Notice how I couldn't do it while in fullscreen but easily was able to when back to windowed mode.

Any thoughts on what might be causing this and how to fix it??

Thanks in advance!
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Post by lmsilva »

I also tried to lower the OS screen definition to 800x600 and recalibrating but that didn't fix it... :o(
digitall
ScummVM Developer
Posts: 1185
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

I think that is a problem with libSDL v1.2

The mouse input behaviour with touchscreens on Windows 8 when you go fullscreen seems to be hinky.

This problem is not limited to ScummVM. See:
http://www.vogons.org/viewtopic.php?t=27360

Unfortunately, since SDL v1.3+ have made major design changes which break the compatibility of various features, we are currently stuck until we can work out a viable migration plan.

Some of the hacks on that thread including the SDL_MOUSE_RELATIVE environment variable may be helpful to you.

Also, note we do clearly say that Windows 8 may have issues with touchscreens in the relevant platform notes:
http://wiki.scummvm.org/index.php/Windows
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Post by lmsilva »

I will try the libsdl replacement solution though, like I said, it seems to work fine in windowed mode which makes me think there MIGHT be something else we can do in ScummVM (natively) for it to accurately detect the touch movements.

Anyway, I read through the entire thread and noticed you referenced SDL_TouchFingerEvent. I downloaded the source and confirmed your suspicion: libsdl1.2 does NOT support the SDL_TouchFingerEvent (though libsdl2 does).

Any chance you could do a stranger a favor and try to compile scummvm against libsdl2 (seeing as you are AWESOME and already have a dev environment set up ;o))?
digitall wrote:See here for previous discussion about using Touchscreens with the Win32 port:
http://forums.scummvm.org/viewtopic.php ... ouchscreen
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Post by lmsilva »

Ok, I'm going to read through all these! Thanks!!!

Also, please ignore my last post about trying to compile against libsdl2...

I saw a post online that said that "it SHOULD work as the PS3 port is linked against it" but, if you are saying it breaks other features, then ignore my last post!
digitall wrote:I think that is a problem with libSDL v1.2

The mouse input behaviour with touchscreens on Windows 8 when you go fullscreen seems to be hinky.

This problem is not limited to ScummVM. See:
http://www.vogons.org/viewtopic.php?t=27360

Unfortunately, since SDL v1.3+ have made major design changes which break the compatibility of various features, we are currently stuck until we can work out a viable migration plan.

Some of the hacks on that thread including the SDL_MOUSE_RELATIVE environment variable may be helpful to you.

Also, note we do clearly say that Windows 8 may have issues with touchscreens in the relevant platform notes:
http://wiki.scummvm.org/index.php/Windows
digitall
ScummVM Developer
Posts: 1185
Joined: Thu Aug 02, 2012 1:40 pm

Post by digitall »

The PS3 port is actually linked against a SDL v1.3.0 development snapshot as support for SDL on PS3 was only added during the v1.3.0 development.

That snapshot is prior to the SDL v2.0 major refactoring and breakage of older APIs :/

See:
http://wiki.scummvm.org/index.php/PlayS ... rom_source
https://github.com/zeldin/SDL_PSL1GHT

See here for the thread on this and link to an IRC discussions about the issues:
http://forums.scummvm.org/viewtopic.php ... hlight=sdl

Apart from the removal of the CDROM API, there are major changes associated with the Keyboard API which have caused problems, then there are the various bugs.. :/
lmsilva
Posts: 9
Joined: Tue May 13, 2014 4:25 pm

Post by lmsilva »

Well, that's disappointing! :o|

But, anyway, thank you so much for all your help (especially that link to vogons.org. That whole thread was VERY interesting)!

I'm going to try and find the time to play around with the ScummVM and libSDL source code to try and get a work around for my problem (based on what I learned today)!
digitall wrote:The PS3 port is actually linked against a SDL v1.3.0 development snapshot as support for SDL on PS3 was only added during the v1.3.0 development.

That snapshot is prior to the SDL v2.0 major refactoring and breakage of older APIs :/

See:
http://wiki.scummvm.org/index.php/PlayS ... rom_source
https://github.com/zeldin/SDL_PSL1GHT

See here for the thread on this and link to an IRC discussions about the issues:
http://forums.scummvm.org/viewtopic.php ... hlight=sdl

Apart from the removal of the CDROM API, there are major changes associated with the Keyboard API which have caused problems, then there are the various bugs.. :/
Post Reply