diff options
| author | Matthew Parlane <parlane@gmail.com> | 2016-05-21 11:16:19 +1200 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2016-05-21 11:16:19 +1200 |
| commit | 25f88bf751749f03ecbde8b8ca353059f7caf7e7 (patch) | |
| tree | efe1ec5a237449a111b8d496136d52fa8d4dfbb7 /Source/Core | |
| parent | 63d2e6ca36e149feea990c22db11035a3e3a345f (diff) | |
| parent | e01bdeddf289177b768ff46c8db1655464c9e69e (diff) | |
Merge pull request #3823 from Summate/development
Piping the wxMsgAlert through netplay window during netplay ...
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/DolphinWX/Main.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Source/Core/DolphinWX/Main.cpp b/Source/Core/DolphinWX/Main.cpp index e085a94bb2..bd24b3b0e3 100644 --- a/Source/Core/DolphinWX/Main.cpp +++ b/Source/Core/DolphinWX/Main.cpp @@ -42,6 +42,7 @@ #include "DolphinWX/WxUtils.h" #include "DolphinWX/Debugger/CodeWindow.h" #include "DolphinWX/Debugger/JitWindow.h" +#include "DolphinWX/NetPlay/NetWindow.h" #include "UICommon/UICommon.h" @@ -366,10 +367,21 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style* { #ifdef __WXGTK__ if (wxIsMainThread()) + { #endif - return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), - (yes_no) ? wxYES_NO : wxOK, wxWindow::FindFocus()); + NetPlayDialog*& npd = NetPlayDialog::GetInstance(); + if (npd == nullptr) + { + return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption), + (yes_no) ? wxYES_NO : wxOK, wxWindow::FindFocus()); + } + else + { + npd->AppendChat("/!\\ " + std::string{text}); + return true; + } #ifdef __WXGTK__ + } else { wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC); |
