TTF_WasInit - Man Page
Check if SDL_ttf is initialized.
Header File
Defined in SDL3_ttf/SDL_ttf.h
Synopsis
#include "SDL3_ttf/SDL_ttf.h" int TTF_WasInit(void);
Description
This reports the number of times the library has been initialized by a call to TTF_Init (), without a paired deinitialization request from
TTF_Quit ().
In short: if it's greater than zero, the library is currently initialized and ready to work. If zero, it is not initialized.
Despite the return value being a signed integer, this function should not return a negative number.
Return Value
Returns the current number of initialization calls, that need to eventually be paired with this many calls to TTF_Quit ().
Thread Safety
It is safe to call this function from any thread.
Availability
This function is available since SDL_ttf 3.0.0.
See Also
·(3), TTF_Init(3), ·(3), TTF_Quit(3)
Info
SDL_ttf 3.2.2 SDL_ttf3 FUNCTIONS