I can’t find out why the keyboard doesn’t work when the mouse
and the display are working properly. The following is the program
I used, which is a modified version of the example for using the
keyboard. This program has be compiled with vc5 and gcc
on nt&95 and with gcc on linux with the same result. I saw a posting
here which seemed to suggest that I need to use SDL_RegisterApp()
however I can’t find the function in the documentation.
I can’t find out why the keyboard doesn’t work when the mouse
and the display are working properly. The following is the program
I used, which is a modified version of the example for using the
keyboard. This program has be compiled with vc5 and gcc
on nt&95 and with gcc on linux with the same result. I saw a posting
here which seemed to suggest that I need to use SDL_RegisterApp()
however I can’t find the function in the documentation.
Can any one suggest what I’ve done wrong. Thanks
It sounds like you’re doing everything fine. This is a known bug,
but I don’t have access to an NT system to find out what’s going on.
I suspect that DirectInput isn’t being handled properly for some
reason. Is there anybody with NT who can compile this program and
debug what’s going on?
See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
We’re running Win2k, and the DirectInput works most of the time. No idea
of NT4. Sometimes it loses focus and stays that way. We couldn’t figure
out why. The SDL code is checking for re-acquisition on every run through
the event loop, you’d think that would do it. We ended up copying the
dibevent keyboard stuff over to the dx5events (couldn’t see anything wrong
and pressed for time), and just not using DirectInput. Not sure if it’s
just Win2k that was doing this or not.
–Manny>It sounds like you’re doing everything fine. This is a known bug,
but I don’t have access to an NT system to find out what’s going on.
I suspect that DirectInput isn’t being handled properly for some
reason. Is there anybody with NT who can compile this program and
debug what’s going on?
See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software
I can’t find out why the keyboard doesn’t work when the mouse
and the display are working properly. The following is the program
I used, which is a modified version of the example for using the
keyboard. This program has be compiled with vc5 and gcc
on nt&95 and with gcc on linux with the same result. I saw a posting
here which seemed to suggest that I need to use SDL_RegisterApp()
however I can’t find the function in the documentation.
Can any one suggest what I’ve done wrong. Thanks
Okay, I finally had a chance to look at this on NT.
The problem is that you are calling SDL_WaitEvent(), and since you have
keyboard events ignored and mouse events dropped in the filter, you never
actually see the keyboard state change. If you change the code so that
you loop regularly calling SDL_PumpEvents() and checking the key state
and then call SDL_PollEvents() to check for other events, then you’ll
see that it’s working properly.
As I see above, this is a general problem in your code, not limited to
a particular platform.
See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software