fix(ui): remove stray imgui ini on startup
This commit is contained in:
@@ -205,6 +205,11 @@ float combined_ui_scale(float dpi_scale, int zoom_percent) {
|
||||
return std::clamp(dpi_scale + zoom_scale - 1.0f, 0.80f, 4.0f);
|
||||
}
|
||||
|
||||
void remove_stray_imgui_ini() {
|
||||
std::error_code error;
|
||||
std::filesystem::remove("imgui.ini", error);
|
||||
}
|
||||
|
||||
bool text_height_checkbox(const char* label, bool* value) {
|
||||
const ImVec2 padding = ImGui::GetStyle().FramePadding;
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, {padding.x, 0.0f});
|
||||
@@ -4320,6 +4325,7 @@ int runGitree(int argc, char** argv) {
|
||||
ApplicationIconCache application_icon_cache;
|
||||
g_application_icon_cache = &application_icon_cache;
|
||||
|
||||
remove_stray_imgui_ini();
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
ImGui::GetIO().ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
|
||||
Reference in New Issue
Block a user