Fawkes API
Fawkes Development Version
|
SDL Reference keeper. More...
#include <>>
Static Public Member Functions | |
static void | init (unsigned int flags) |
Init SDL. More... | |
static void | quit () throw () |
Conditionally quit SDL. More... | |
static void | force_quit () |
Force quit of SDL. More... | |
SDL Reference keeper.
Use this keeper to initialize and quit the SDL library. As there may be many modules using the SDL a central place for reference counting is needed.
Definition at line 34 of file sdl_keeper.h.
|
static |
Force quit of SDL.
This will quit the SDL no matter of the reference count. Use with extreme care.
Definition at line 106 of file sdl_keeper.cpp.
|
static |
Init SDL.
Keeps track of SDL_Init calls and only calls SDL_InitSubSystem on consecutive calls.
flags | Same flags as for SDL_Init |
Definition at line 64 of file sdl_keeper.cpp.
|
static |
Conditionally quit SDL.
Use this after you are done with the SDL. No subsystem will be closed after all users of SDL quit the usage. Then the whole SDL will be released at once.
Definition at line 92 of file sdl_keeper.cpp.