mirror of https://github.com/libsdl-org/SDL.git
Fixed build when virtual joysticks are disabled
This commit is contained in:
parent
758eb256b9
commit
fbdb637978
|
|
@ -1122,7 +1122,9 @@ SDL_Joystick *SDL_OpenJoystick(SDL_JoystickID instance_id)
|
|||
joystick->attached = true;
|
||||
joystick->led_expiration = SDL_GetTicks();
|
||||
joystick->battery_percent = -1;
|
||||
#ifdef SDL_JOYSTICK_VIRTUAL
|
||||
joystick->is_virtual = (driver == &SDL_VIRTUAL_JoystickDriver);
|
||||
#endif
|
||||
|
||||
if (!driver->Open(joystick, device_index)) {
|
||||
SDL_SetObjectValid(joystick, SDL_OBJECT_TYPE_JOYSTICK, false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue