mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
DolphinWX: pass wxMsgAlert to main thread on non-GTK too
Fixes an issue on macOS where wxMessageBox always returns wxCANCEL when not called from main thread.
This commit is contained in:
@ -352,10 +352,8 @@ void DolphinApp::OnIdle(wxIdleEvent& ev)
|
||||
|
||||
bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*/)
|
||||
{
|
||||
#ifdef __WXGTK__
|
||||
if (wxIsMainThread())
|
||||
{
|
||||
#endif
|
||||
NetPlayDialog*& npd = NetPlayDialog::GetInstance();
|
||||
if (npd != nullptr && npd->IsShown())
|
||||
{
|
||||
@ -364,7 +362,6 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
||||
}
|
||||
return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), (yes_no) ? wxYES_NO : wxOK,
|
||||
wxWindow::FindFocus());
|
||||
#ifdef __WXGTK__
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -375,7 +372,6 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
||||
main_frame->panic_event.Wait();
|
||||
return main_frame->bPanicResult;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string wxStringTranslator(const char* text)
|
||||
|
Reference in New Issue
Block a user