SDL3pp
A slim C++ wrapper for SDL3
|
A structure used for thread-safe initialization and shutdown. More...
Public Member Functions | |
bool | ShouldInit () |
Return whether initialization should be done. More... | |
bool | ShouldQuit () |
Return whether cleanup should be done. More... | |
void | SetInitialized (bool initialized) |
Finish an initialization state transition. More... | |
Here is an example of using this:
Note that this doesn't protect any resources created during initialization, or guarantee that nobody is using those resources during cleanup. You should use other mechanisms to protect those, if that's a concern for your code.