Skip to content

Commit 6c392d5

Browse files
authored
UI: Fix assertions (#1623)
1 parent 9fb3c76 commit 6c392d5

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/gui/DownloadGraphicPacksWindow.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,14 +182,14 @@ void DownloadGraphicPacksWindow::UpdateThread()
182182
if (checkGraphicPackDownloadedVersion(assetName, hasVersionFile))
183183
{
184184
// already up to date
185-
wxMessageBox(_("No updates available."), _("Graphic packs"), wxOK | wxCENTRE, this->GetParent());
185+
wxMessageBox(_("No updates available."), _("Graphic packs"), wxOK | wxCENTRE, this);
186186
m_threadState = ThreadFinished;
187187
return;
188188
}
189189
if (hasVersionFile)
190190
{
191191
// if a version file already exists (and graphic packs are installed) ask the user if he really wants to update
192-
if (wxMessageBox(_("Updated graphic packs are available. Do you want to download and install them?"), _("Graphic packs"), wxYES_NO, this->GetParent()) != wxYES)
192+
if (wxMessageBox(_("Updated graphic packs are available. Do you want to download and install them?"), _("Graphic packs"), wxYES_NO, this) != wxYES)
193193
{
194194
// cancel update
195195
m_threadState = ThreadFinished;
@@ -336,7 +336,7 @@ int DownloadGraphicPacksWindow::ShowModal()
336336
{
337337
if(CafeSystem::IsTitleRunning())
338338
{
339-
wxMessageBox(_("Graphic packs cannot be updated while a game is running."), _("Graphic packs"), 5, this->GetParent());
339+
wxMessageBox(_("Graphic packs cannot be updated while a game is running."), _("Graphic packs"), 5, this);
340340
return wxID_CANCEL;
341341
}
342342
m_thread = std::thread(&DownloadGraphicPacksWindow::UpdateThread, this);

src/gui/input/panels/InputPanel.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,7 @@ void InputPanel::load_controller(const EmulatedControllerPtr& controller)
174174
continue;
175175

176176
auto button_name = controller->get_mapping_name(mapping);
177-
#if BOOST_OS_WINDOWS
178-
text->SetLabelText(button_name);
179-
#else
180-
// SetLabelText doesn't seem to work here for some reason on wxGTK
181-
text->ChangeValue(button_name);
182-
#endif
177+
text->ChangeValue(button_name);
183178
}
184179
}
185180

0 commit comments

Comments
 (0)