ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > Help and Support > Virtual Keyboard typing too fast for engine
Virtual Keyboard typing too fast for engine
  Author    Thread Reply to topic
stoo



Joined: 15 Feb 2018
Posts: 4
Location: Scotland
Virtual Keyboard typing too fast for engine 

ScummVM 2.0.0 stable
Raspbian port (SDL2) running on RPi3B
Built from source with vkbd support
I am not a coder.

--

In certain games the virtual keyboard seems to enter keystrokes faster than the engine can register them. I first noticed it when trying to enter a save game name in BASS, but it happens elsewhere too.

I saw a thread from 2012 where tsoliman identified the issue and suggested a hack. The tree with the hack is long gone so I don't know what his suggestion was.

I am struggling to think of a way to fix this without std libs (like throwing a udelay in virtual-keyboard.cpp and crossing my fingers). Is there a better way of resolving this?

Edit: man it's been a long time since I used bbcode

 Reply with quote  
Post Sun Feb 25, 2018 5:40 pm 
 View user's profile Send private message
stoo



Joined: 15 Feb 2018
Posts: 4
Location: Scotland
Re: Virtual Keyboard typing too fast for engine 

quote:
Originally posted by stoo
Is there a better way of resolving this?


First person to say "use a real keyboard" gets shot, btw.
 Reply with quote  
Post Sun Feb 25, 2018 5:50 pm 
 View user's profile Send private message
dafioram



Joined: 24 Sep 2016
Posts: 31
 

You may find things a lot easier if you use retropie. They have prebuild images https://retropie.org.uk/download/ or you can build retorpie ontop of your current setup https://retropie.org.uk/docs/Manual-Installation/. Currently stretch is experimental with retropie.

You can install scummvm from retropie by going to optional programs and building it from source (to get scummvm 2.0.0 or some other version).

The vkeybd worked fine for me when I used it in retropie.

 Reply with quote  
Post Sun Feb 25, 2018 7:55 pm 
 View user's profile Send private message
stoo



Joined: 15 Feb 2018
Posts: 4
Location: Scotland
 

Hi dafioram,

I am using RetroPie. I'm using 2.0.0 as that's the latest in the RetroPie repo.

Feel free to test it yourself. Open the save menu in BASS and try to enter a save name. It will enter exactly one character, the last character in the string, and the rest will be lost, because it can't accept keyboard entry at the speed the vkbd does it.

Same thing happens in Simon the Sorcerer when you try to enter a name for a save game.

 Reply with quote  
Post Sun Feb 25, 2018 8:38 pm 
 View user's profile Send private message
dafioram



Joined: 24 Sep 2016
Posts: 31
 

Good find, its not just for raspberry pi though. I reported it here: https://bugs.scummvm.org/ticket/10439.

 Reply with quote  
Post Mon Feb 26, 2018 1:37 am 
 View user's profile Send private message
stoo



Joined: 15 Feb 2018
Posts: 4
Location: Scotland
vkbd backend, not engine-specific 

Thanks, dafioram.

To my primitive understanding: fixing this without some kind of delay inserted between keystroke events would require that affected engines fired an event on keystroke "completion" that vkbd could wait for. As it stands, the vkbd processes KEYUP and KEYDOWN events as fast as possible which isn't ideal.

So far I've found the problem occurs in eob, eob2, simon1, sky. It probably occurs in other games, I just haven't tested them yet.

Might be helpful to make clear in the ticket that it's not a bug with a particular engine.

 Reply with quote  
Post Tue Feb 27, 2018 12:47 pm 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge