Post new topic    
Page «  1, 2
Metal King Slime
Send private message
 
 PostTue Mar 19, 2013 1:10 am
Send private message Reply with quote
Huh, that doesn't sound right. What happens if you use the gfx_sdl backend instead of gfx_directx, or vice versa? you can switch between them by adding/removing gfx_directx.dll or via command line arguments.
Slime Knight
Send private message
 
 PostTue Mar 19, 2013 4:28 pm
Send private message Reply with quote
Thank you so much! The audiere.dll fixes the problem right up. Grin
Soda Piggy Website
Liquid Metal King Slime
Send private message
 
 PostTue Mar 19, 2013 4:49 pm
Send private message Reply with quote
VampiDucki wrote:
Thank you so much! The audiere.dll fixes the problem right up. :D


That can't possibly be it-- audierre.dll is for the music backed, and I don't see how it could be affecting the keyboard input, which is fully controlled by the gfx backend.

Can you be more specific about what you did to work around the problem?
Slime Knight
Send private message
 
 PostTue Mar 19, 2013 4:59 pm
Send private message Reply with quote
Seriously, all I did was remove gfx_directx.dll and add audiere.dll. I thought it was kind of strange too, but it's working for some odd reason...
Soda Piggy Website
Slime Knight
Send private message
 
 PostTue Mar 19, 2013 5:01 pm
Send private message Reply with quote
Correction, it seems to work just fine without either. I removed both from the folder. Just getting rid of gfx_directx.dll made it work fine.
Soda Piggy Website
Liquid Metal King Slime
Send private message
 
 PostTue Mar 19, 2013 5:08 pm
Send private message Reply with quote
Ah! yes, that make sense. Removing gfx_directx.dll switched you over from the gfx_directx to the gfx_sdl backend. So that means that the bug you were experiencing was in the gfx_directx backend.
Metal King Slime
Send private message
 
 PostWed Mar 20, 2013 4:13 am
Send private message Reply with quote
Hmm, I see that gfx_directx is indeed doing something unusual with the arrow keys. When it receives one of those keypresses, it checks whether the "extended key flag" is set. Buried in the winapi documentation I found:

Quote:
The Extended Key Flag is 1 if the keystroke results from one of the additional keys on the IBM enhanced keyboard. (The enhanced keyboard has 101 or 102 keys. Function keys are across the top. Cursor movement keys are separate from the numeric keypad, but the numeric keypad also duplicates the cursor movement keys.) This flag is set to 1 for the Alt and Ctrl keys at the right of the keyboard, the cursor movement keys (including Insert and Delete) that are not part of the numeric keypad, the slash (/) and Enter keys on the numeric keypad, and the Num Lock key


Basically, by checking these bits gfx_directx is trying to support early PC keyboards that did not have separate arrows keys

I think this could be considered an obscure bug in Joy2key, where it doesn't set the extended flag, and unsurprisingly almost no application (not the example code in the winapi documentation, nor any code I could find on the internet) bothers to check the extended key bit.

I'll remove that check from gfx_directx, because the way it's written, it would actually break on those old keyboards by treating them as if they didn't have arrow keys.
Slime Knight
Send private message
 
 PostWed Mar 20, 2013 3:01 pm
Send private message Reply with quote
Anybody with a old keyboard like that is going to have a Model M which did have arrow keys anyway.

I've never seen anybody looking for PC/XT or AT's.
Display posts from previous:
Page «  1, 2