From 6c392d5a22a827437de7dbab11c47d90d0b443cf Mon Sep 17 00:00:00 2001 From: oltolm Date: Mon, 30 Jun 2025 00:15:23 +0200 Subject: [PATCH] UI: Fix assertions (#1623) --- src/gui/DownloadGraphicPacksWindow.cpp | 6 +++--- src/gui/input/panels/InputPanel.cpp | 7 +------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/gui/DownloadGraphicPacksWindow.cpp b/src/gui/DownloadGraphicPacksWindow.cpp index 9ea9e1dd..f2a90959 100644 --- a/src/gui/DownloadGraphicPacksWindow.cpp +++ b/src/gui/DownloadGraphicPacksWindow.cpp @@ -182,14 +182,14 @@ void DownloadGraphicPacksWindow::UpdateThread() if (checkGraphicPackDownloadedVersion(assetName, hasVersionFile)) { // already up to date - wxMessageBox(_("No updates available."), _("Graphic packs"), wxOK | wxCENTRE, this->GetParent()); + wxMessageBox(_("No updates available."), _("Graphic packs"), wxOK | wxCENTRE, this); m_threadState = ThreadFinished; return; } if (hasVersionFile) { // if a version file already exists (and graphic packs are installed) ask the user if he really wants to update - if (wxMessageBox(_("Updated graphic packs are available. Do you want to download and install them?"), _("Graphic packs"), wxYES_NO, this->GetParent()) != wxYES) + if (wxMessageBox(_("Updated graphic packs are available. Do you want to download and install them?"), _("Graphic packs"), wxYES_NO, this) != wxYES) { // cancel update m_threadState = ThreadFinished; @@ -336,7 +336,7 @@ int DownloadGraphicPacksWindow::ShowModal() { if(CafeSystem::IsTitleRunning()) { - wxMessageBox(_("Graphic packs cannot be updated while a game is running."), _("Graphic packs"), 5, this->GetParent()); + wxMessageBox(_("Graphic packs cannot be updated while a game is running."), _("Graphic packs"), 5, this); return wxID_CANCEL; } m_thread = std::thread(&DownloadGraphicPacksWindow::UpdateThread, this); diff --git a/src/gui/input/panels/InputPanel.cpp b/src/gui/input/panels/InputPanel.cpp index 514461fd..941bbd66 100644 --- a/src/gui/input/panels/InputPanel.cpp +++ b/src/gui/input/panels/InputPanel.cpp @@ -174,12 +174,7 @@ void InputPanel::load_controller(const EmulatedControllerPtr& controller) continue; auto button_name = controller->get_mapping_name(mapping); -#if BOOST_OS_WINDOWS - text->SetLabelText(button_name); -#else - // SetLabelText doesn't seem to work here for some reason on wxGTK - text->ChangeValue(button_name); -#endif + text->ChangeValue(button_name); } }