Different keyboard response in surface and OpenGL

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

Different keyboard response in surface and OpenGL

Postby emendelson » 2017-12-21 @ 01:48

This question has nothing to do with games, but I hope it might be useful anyway, because it's about different ways the keyboard buffer seems to work with different output= settings.

I have a project that runs the old WordPerfect for DOS program under DOSBox. WordPerfect 6.x lets you switch between text and graphic modes by pressing a few keys, using a menu. For example, if you're in text mode, you switch to graphics mode by pressing Ctrl-F3 to bring up the Screen menu, then G for Graphics. If you want to go back to text mode, then you press Ctrl-F3, then T for Text.

If I use output=opengl or output=ddraw, this works perfectly. But if I use output=surface (which is useful in this system for various reasons), then this happens:

If I'm in text mode, and press Ctrl-F3, then G, the program switches to graphic mode and the letter "g" gets typed repeatedly in the editing window until I press another key. The same thing happens if I'm in graphic mode and press Ctrl-F3, then T to go back to text mode: the screen switches to text mode and then the letter "t" gets typed repeatedly until I press a key and make it stop. It seems as if the keyboard got "stuck" on the last letter typed before the screen mode switches. Again - this happens with output=surface, not opengl or ddraw.

I've tried looking around the code to see if I could find any explanation for this behavior, but I can't figure out (a) why it happens and (b) what might fix it.

Again, I know this has nothing to do with games. But I hope this might point to some obscure problem in the code that might be worth fixing. I'll be glad to try out any proposed fixes if anyone can think of any. (Incidentally, I use VESA graphics modes in WPDOS for high-resolution graphics.)

(And, yes, I have a similar project based on vDos, but vDos supports only VGA resolution, nothing higher. With DOSBox, I can use 1280x1024 graphics in WordPerfect for DOS, so there are reasons to maintain both projects.)
emendelson
Oldbie
 
Posts: 744
Joined: 2010-2-14 @ 02:00

Return to DOSBox Development

Who is online

Users browsing this forum: Google Feedfetcher and 1 guest