diff --git a/src/menu/MainWindow.cpp b/src/menu/MainWindow.cpp index aeeade9..03e0e5a 100644 --- a/src/menu/MainWindow.cpp +++ b/src/menu/MainWindow.cpp @@ -23,7 +23,6 @@ MainWindow::MainWindow(int32_t w, int32_t h, Renderer* renderer) : GuiFrame(w, h auto bgMusic_path = "bgMusic.ogg"; auto music_click = "button_click.mp3"; - TTF_Init(); TTF_Font *font; SDL_RWops *rw = SDL_RWFromMem((void *) Resources::GetFile(font_path), Resources::GetFileSize(font_path)); diff --git a/src/system/SDLSystem.cpp b/src/system/SDLSystem.cpp index 9a1bd53..c669e79 100644 --- a/src/system/SDLSystem.cpp +++ b/src/system/SDLSystem.cpp @@ -18,6 +18,7 @@ #include "../utils/logger.h" #include #include +#include SDLSystem::SDLSystem() { SDL_Init(SDL_INIT_EVERYTHING); @@ -56,6 +57,8 @@ SDLSystem::SDLSystem() { auto dev = Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 640); SDL_PauseAudioDevice(dev, 0); + + TTF_Init(); } SDLSystem::~SDLSystem() {