Skip to content

Commit

Permalink
Fix bug from changes to support font scale
Browse files Browse the repository at this point in the history
We were initializing imgui and loading the fonts at each frame!
  • Loading branch information
guillaumechereau committed Nov 3, 2024
1 parent 1800aa5 commit b86fa36
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ static void gui_init(void)
if (!gui->initialized) {
init_ImGui();
goxel.gui.panel_width = GUI_PANEL_WIDTH_NORMAL;
gui->initialized = true;
}

if (!gui->shader) {
Expand All @@ -478,8 +479,6 @@ static void gui_init(void)

ImGuiIO& io = ImGui::GetIO();
if (!io.Fonts->TexID) load_fonts_texture();

load_fonts_texture();
}

void gui_release(void)
Expand Down

0 comments on commit b86fa36

Please sign in to comment.