Win32 (DX) mouse device capture

Hi,

Is there a sensible way to remove the requirement in the win32 (DirectX) code
(SDL_dx5events.c) that will prevent the code from requiring that a mouse and/or
keyboard are present on the system?

Basically, I need to use SDL on a system that has neither a mouse or a keyboard
attached and the hardcoded mouse and keyboard handlers cause the startup to fail
if the mouse device isn’t present on the system (“DirectInput::CreateDevice:
Device not registered”).

Obviously I could knock the hard coded mouse and keyboard device references and
(try to) rebuild the library but I’d much rather not hard code a solution to fix
a problem like this. In fact, I’d much rather that such a fix was put into SDL
and I don’t have to worry about maintaining code :slight_smile:

Thanks,

Nick

Hi,

Is there a sensible way to remove the requirement in the win32 (DirectX) code
(SDL_dx5events.c) that will prevent the code from requiring that a mouse and/or
keyboard are present on the system?

There are similar hacks to do this in some of the other video drivers.
Look for the environment variable SDL_NOMOUSE and go ahead and implement
something similar for the Windows backend. I’ll be happy to accept a patch.

Thanks!
-Sam Lantinga, Software Engineer, Blizzard Entertainment

Yeah, I just looking for such hacks, with which SDL could
be used just as a simple graph lib that could be embedded
easily in other common desktop program.

“Sam Lantinga” ???:E1CYxcL-0008RL-00 at twomix.devolution.com…>> Is there a sensible way to remove the requirement in the win32 (DirectX)

code
(SDL_dx5events.c) that will prevent the code from requiring that a mouse
and/or
keyboard are present on the system?

There are similar hacks to do this in some of the other video drivers.
Look for the environment variable SDL_NOMOUSE and go ahead and implement
something similar for the Windows backend. I’ll be happy to accept a
patch.