TTF_WasInit(3)

TTF_WasInit3

Check if sdl_ttf is initialized.

Usage

#include "SDL3_ttf/SDL_ttf.h"

int TTF_WasInit(void);

Header file

Defined in SDL3_ttf/SDL_ttf.h

Overview

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.

From libsdl3-ttf-doc 3.2.2+ds-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.