[PATCH resend 1/7] winebus.sys: Add SDL gamepad and joystick driver
Alexandre Julliard
julliard at winehq.org
Mon Feb 19 07:59:47 CST 2018
Aric Stewart <aric at 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 at winehq.org
More information about the wine-devel
mailing list