Explorar o código

Return a correlation error when trigger rumble is attempted without correlation

Sam Lantinga %!s(int64=3) %!d(string=hai) anos
pai
achega
d9b5805ba5
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      src/joystick/windows/SDL_rawinputjoystick.c

+ 3 - 1
src/joystick/windows/SDL_rawinputjoystick.c

@@ -1322,8 +1322,10 @@ RAWINPUT_JoystickRumbleTriggers(SDL_Joystick *joystick, Uint16 left_rumble, Uint
         if (!SUCCEEDED(hr)) {
             return SDL_SetError("Setting vibration failed: 0x%lx\n", hr);
         }
+        return 0:
+    } else {
+        return SDL_SetError("Controller isn't correlated yet, try hitting a button first");
     }
-    return 0;
 #else
     return SDL_Unsupported();
 #endif