[PATCH resend 1/7] winebus.sys: Add SDL gamepad and joystick driver
Signed-off-by: Aric Stewart <aric(a)codeweavers.com> --- configure | 149 +++++++++++++++++++++++++++++++++++++++++++ configure.ac | 16 +++++ dlls/winebus.sys/Makefile.in | 5 +- dlls/winebus.sys/bus.h | 1 + dlls/winebus.sys/bus_sdl.c | 58 +++++++++++++++++ dlls/winebus.sys/main.c | 15 ++++- include/config.h.in | 9 +++ 7 files changed, 249 insertions(+), 4 deletions(-) create mode 100644 dlls/winebus.sys/bus_sdl.c
Aric Stewart <aric(a)codeweavers.com> writes:
@@ -708,11 +708,22 @@ NTSTATUS WINAPI DriverEntry( DRIVER_OBJECT *driver, UNICODE_STRING *path ) static UNICODE_STRING udev = {sizeof(udevW) - sizeof(WCHAR), sizeof(udevW), (WCHAR *)udevW}; static const WCHAR iohidW[] = {'\\','D','r','i','v','e','r','\\','I','O','H','I','D',0}; static UNICODE_STRING iohid = {sizeof(iohidW) - sizeof(WCHAR), sizeof(iohidW), (WCHAR *)iohidW}; + static const WCHAR sdlW[] = {'\\','D','r','i','v','e','r','\\','S','D','L','J','O','Y',0}; + static UNICODE_STRING sdl = {sizeof(sdlW) - sizeof(WCHAR), sizeof(sdlW), (WCHAR *)sdlW}; + static const WCHAR SDL_enabledW[] = {'E','n','a','b','l','e',' ','S','D','L',0}; + static const UNICODE_STRING SDL_enabled = {sizeof(SDL_enabledW) - sizeof(WCHAR), sizeof(SDL_enabledW), (WCHAR*)SDL_enabledW};
TRACE( "(%p, %s)\n", driver, debugstr_w(path->Buffer) );
- IoCreateDriver(&udev, udev_driver_init); - IoCreateDriver(&iohid, iohid_driver_init); + if (check_bus_option(path, &SDL_enabled, 1)) + { + IoCreateDriver(&sdl, sdl_driver_init); + } + else + { + IoCreateDriver(&udev, udev_driver_init); + IoCreateDriver(&iohid, iohid_driver_init); + }
You should load SDL dynamically, since the driver can work without it. -- Alexandre Julliard julliard(a)winehq.org
participants (2)
-
Alexandre Julliard -
Aric Stewart