Selaa lähdekoodia

include: Clarified documentation for two functions.

Ryan C. Gordon 1 vuosi sitten
vanhempi
commit
d1b831e232
2 muutettua tiedostoa jossa 5 lisäystä ja 2 poistoa
  1. 4 1
      include/SDL3/SDL_gamepad.h
  2. 1 1
      include/SDL3/SDL_touch.h

+ 4 - 1
include/SDL3/SDL_gamepad.h

@@ -314,7 +314,10 @@ extern DECLSPEC int SDLCALL SDL_ReloadGamepadMappings(void);
 /**
  * Get the mapping at a particular index.
  *
- * \param count On return, set to the number of mappings returned. Can be NULL.
+ * You must free the returned pointer with SDL_free() when you are done with
+ * it, but you do _not_ free each string in the array.
+ *
+ * \param count a pointer filled in with the number of mappings returned, can be NULL.
  * \returns an array of the mapping strings, NULL-terminated. Must be freed with SDL_free().
  *          Returns NULL on error.
  *

+ 1 - 1
include/SDL3/SDL_touch.h

@@ -74,7 +74,7 @@ typedef struct SDL_Finger
  *
  * This was fixed for Android in SDL 2.0.1.
  *
- * \param count a pointer filled in with the number of devices returned
+ * \param count a pointer filled in with the number of devices returned, can be NULL.
  * \returns a 0 terminated array of touch device IDs which should be
  *          freed with SDL_free(), or NULL on error; call SDL_GetError() for
  *          more details.