aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 13:36:17 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 13:36:17 +0100
commit0c02511f6a64766174cb0db3beb4cc159d3efdf7 (patch)
tree1ae713cfaad559aaae623f6e38639c2c10b1a158 /src/crepe/facade/SDLContext.cpp
parent24578c9afb61ae65b300dd7fb645220e133089be (diff)
merging wouter
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r--src/crepe/facade/SDLContext.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index 7bd9dbc..c19f0aa 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -294,9 +294,7 @@ void SDLContext::draw_text(const Text & text, const Font & font){
.b = text.data.text_color.b,
.a = text.data.text_color.a,
};
- TTF_Font * ttf_font = TTF_OpenFont(font.get_path().c_str(), Config::get_instance().font.size);
SDL_Surface * font_surface = TTF_RenderText_Solid(font.get_font(), text.text.c_str(), color);
- TTF_CloseFont(ttf_font);
SDL_Texture * font_texture = SDL_CreateTextureFromSurface(this->game_renderer.get(), font_surface);
SDL_FreeSurface(font_surface);