wasInit static method

int wasInit()

Check if SDL_ttf is initialized.

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.

\returns the current number of initialization calls, that need to eventually be paired with this many calls to TTF_Quit().

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL_ttf 3.0.0.

\sa TTF_Init \sa TTF_Quit

extern SDL_DECLSPEC int SDLCALL TTF_WasInit(void)

Implementation

static int wasInit() {
  return ttfWasInit();
}