@@ -146,6 +146,10 @@ typedef struct SDL_GameControllerButtonBind
146
146
* If a new mapping is loaded for an already known controller GUID, the later
147
147
* version will overwrite the one currently loaded.
148
148
*
149
+ * If this function is called before SDL_Init, SDL will generate
150
+ * an SDL_CONTROLLERDEVICEADDED event for matching controllers that are
151
+ * plugged in at the time that SDL_Init is called.
152
+ *
149
153
* Mappings not belonging to the current platform or with no platform field
150
154
* specified will be ignored (i.e. mappings for Linux will be ignored in
151
155
* Windows, etc).
@@ -164,6 +168,7 @@ typedef struct SDL_GameControllerButtonBind
164
168
* \sa SDL_GameControllerAddMapping
165
169
* \sa SDL_GameControllerAddMappingsFromFile
166
170
* \sa SDL_GameControllerMappingForGUID
171
+ * \sa SDL_CONTROLLERDEVICEADDED
167
172
*/
168
173
extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW (SDL_RWops * rw , int freerw );
169
174
@@ -193,6 +198,10 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
193
198
* "341a3608000000000000504944564944,Afterglow PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7"
194
199
* ```
195
200
*
201
+ * If this function is called before SDL_Init, SDL will generate
202
+ * an SDL_CONTROLLERDEVICEADDED event for matching controllers that are
203
+ * plugged in at the time that SDL_Init is called.
204
+ *
196
205
* \param mappingString the mapping string.
197
206
* \returns 1 if a new mapping is added, 0 if an existing mapping is updated,
198
207
* -1 on error; call SDL_GetError() for more information.
@@ -201,6 +210,7 @@ extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw,
201
210
*
202
211
* \sa SDL_GameControllerMapping
203
212
* \sa SDL_GameControllerMappingForGUID
213
+ * \sa SDL_CONTROLLERDEVICEADDED
204
214
*/
205
215
extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping (const char * mappingString );
206
216
0 commit comments