From 0a0e03a7694b4b9cc72751e83db2f14f1536e64c Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 26 Jun 2025 11:04:55 +0200 Subject: [PATCH] fix: not initialising TTF module --- src/io/window.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/io/window.c b/src/io/window.c index 3c44c66..4c19c90 100644 --- a/src/io/window.c +++ b/src/io/window.c @@ -10,6 +10,7 @@ #include "../error.h" #include "../game/game.h" #include "../game/time.h" +#include "SDL_ttf.h" #include "audio.h" #include "input.h" #include "render.h" @@ -22,6 +23,8 @@ void window_init(struct gamedata const* gdat) { assert(!win && !close); if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) fatal(ERROR_SDL_INIT, "SDL could not initialize! SDL Error: %s", SDL_GetError()); + if (TTF_Init() < 0) + fatal(ERROR_SDL_INIT, "TTF could not initialize! TTF Error: %s", TTF_GetError()); win = SDL_CreateWindow("tetris clone", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN); if (win == NULL)