TTF_WasInit - Check if SDL_ttf is initialized.
Contents
Availability
This function is available since SDL_ttf 3.0.0.
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.
Header File
Defined in SDL3_ttf/SDL_ttf.h
Name
TTF_WasInit - Check if SDL_ttf is initialized.
Return Value
Returns the current number of initialization calls, that need to eventually be paired with this many
calls to TTF_Quit ().
See Also
•(3), TTF_Init(3), •(3), TTF_Quit(3) SDL_ttf SDL_ttf 3.2.2 TTF_WasInit(3)
Synopsis
#include"SDL3_ttf/SDL_ttf.h"intTTF_WasInit(void);
Thread Safety
It is safe to call this function from any thread.
