Commit 2a754ca735566446b5e175b2de381147df655d2c

Ethan Lee 2016-03-07T08:22:55

Allow mappings to be added before GameControllerInit

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/joystick/SDL_gamecontroller.c b/src/joystick/SDL_gamecontroller.c
index 0fd1ef4..93e6fbf 100644
--- a/src/joystick/SDL_gamecontroller.c
+++ b/src/joystick/SDL_gamecontroller.c
@@ -861,7 +861,6 @@ SDL_GameControllerInit(void)
 {
     int i = 0;
     const char *pMappingString = NULL;
-    s_pSupportedControllers = NULL;
     pMappingString = s_ControllerMappings[i];
     while (pMappingString) {
         SDL_GameControllerAddMapping(pMappingString);