Commit 321af03ff95a25af5186542235f45bd346c9c473

Alfred Reynolds 2014-07-03T10:22:26

add a comment to SDL_InitSubSystem explaining its refcounting behavior

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/include/SDL.h b/include/SDL.h
index a907709..848b166 100644
--- a/include/SDL.h
+++ b/include/SDL.h
@@ -130,6 +130,12 @@ extern DECLSPEC int SDLCALL SDL_Init(Uint32 flags);
 
 /**
  *  This function initializes specific SDL subsystems
+ *
+ *  Subsystem initialization is ref-counted, you must call
+ *  SDL_QuitSubSystem for each SDL_InitSubSystem to correctly
+ *  shutdown a subsystem manually (or call SDL_Quit to force shutdown).
+ *  If a subsystem is already loaded then this call will
+ *  increase the ref-count and return.
  */
 extern DECLSPEC int SDLCALL SDL_InitSubSystem(Uint32 flags);