Commit e6dce68f8edab09a6a604a853122b646edefdc21

Edward Rudd 2014-02-03T23:08:53

testhotplug: Actually log the SDL_Error that occured on failures

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/test/testhotplug.c b/test/testhotplug.c
index 4849a6a..d4f64bb 100644
--- a/test/testhotplug.c
+++ b/test/testhotplug.c
@@ -73,12 +73,12 @@ main(int argc, char *argv[])
                                 SDL_Log("Joy Haptic Opened\n");
                                 if (SDL_HapticRumbleInit( haptic ) != 0)
                                 {
-                                    SDL_Log("Could not init Rumble!");
+                                    SDL_Log("Could not init Rumble!: %s\n", SDL_GetError());
                                     SDL_HapticClose(haptic);
                                     haptic = NULL;
                                 }
                             } else {
-                                SDL_Log("Joy haptic open FAILED!\n");
+                                SDL_Log("Joy haptic open FAILED!: %s\n", SDL_GetError());
                             }
                         }
                         else