From 9b4884d58a8a058c99577fb12394ada763b49bd5 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Tue, 3 Aug 2021 09:23:54 -0700 Subject: [PATCH] Warn if you're building a partially functional RAWINPUT driver without device notifications --- src/joystick/windows/SDL_windowsjoystick.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/joystick/windows/SDL_windowsjoystick.c b/src/joystick/windows/SDL_windowsjoystick.c index a3c3aff7e..6fcd0a437 100644 --- a/src/joystick/windows/SDL_windowsjoystick.c +++ b/src/joystick/windows/SDL_windowsjoystick.c @@ -768,6 +768,13 @@ SDL_JoystickDriver SDL_WINDOWS_JoystickDriver = WINDOWS_JoystickGetGamepadMapping }; +#else + +#if SDL_JOYSTICK_RAWINPUT +/* The RAWINPUT driver needs the device notification setup above */ +#error SDL_JOYSTICK_RAWINPUT requires SDL_JOYSTICK_DINPUT || SDL_JOYSTICK_XINPUT +#endif + #endif /* SDL_JOYSTICK_DINPUT || SDL_JOYSTICK_XINPUT */ /* vi: set ts=4 sw=4 expandtab: */