Skip to content

Commit

Permalink
gui: fix bug in previous commit (PR Vita3K#3425). Can't close setting…
Browse files Browse the repository at this point in the history
…s dialog
  • Loading branch information
bookmist committed Nov 9, 2024
1 parent 5857acd commit 15a9e61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion vita3k/gui/src/settings_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ void draw_settings_dialog(GuiState &gui, EmuEnvState &emuenv) {
ImGui::PushStyleColor(ImGuiCol_Text, GUI_COLOR_TEXT_MENUBAR);
ImGui::SetNextWindowPos(ImVec2(emuenv.viewport_pos.x + (display_size.x / 2.f), emuenv.viewport_pos.y + (display_size.y / 2.f)), ImGuiCond_Always, ImVec2(0.5f, 0.48f));
const auto is_custom_config = gui.configuration_menu.custom_settings_dialog;
auto show_settings_dialog = is_custom_config ? gui.configuration_menu.custom_settings_dialog : gui.configuration_menu.settings_dialog;
// Reference here is intentional
auto &show_settings_dialog = is_custom_config ? gui.configuration_menu.custom_settings_dialog : gui.configuration_menu.settings_dialog;
ImGui::Begin("##settings", &show_settings_dialog, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoSavedSettings);
ImGui::SetWindowFontScale(0.7f * RES_SCALE.x);
const auto settings_str = lang.main_window["title"];
Expand Down

0 comments on commit 15a9e61

Please sign in to comment.