Merge pull request #3823 from Summate/development
Piping the wxMsgAlert through netplay window during netplay ...
This commit is contained in:
commit
25f88bf751
|
@ -42,6 +42,7 @@
|
||||||
#include "DolphinWX/WxUtils.h"
|
#include "DolphinWX/WxUtils.h"
|
||||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||||
#include "DolphinWX/Debugger/JitWindow.h"
|
#include "DolphinWX/Debugger/JitWindow.h"
|
||||||
|
#include "DolphinWX/NetPlay/NetWindow.h"
|
||||||
|
|
||||||
#include "UICommon/UICommon.h"
|
#include "UICommon/UICommon.h"
|
||||||
|
|
||||||
|
@ -366,10 +367,21 @@ bool wxMsgAlert(const char* caption, const char* text, bool yes_no, int /*Style*
|
||||||
{
|
{
|
||||||
#ifdef __WXGTK__
|
#ifdef __WXGTK__
|
||||||
if (wxIsMainThread())
|
if (wxIsMainThread())
|
||||||
|
{
|
||||||
#endif
|
#endif
|
||||||
return wxYES == wxMessageBox(StrToWxStr(text), StrToWxStr(caption),
|
NetPlayDialog*& npd = NetPlayDialog::GetInstance();
|
||||||
(yes_no) ? wxYES_NO : wxOK, wxWindow::FindFocus());
|
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__
|
#ifdef __WXGTK__
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC);
|
wxCommandEvent event(wxEVT_HOST_COMMAND, IDM_PANIC);
|
||||||
|
|
Loading…
Reference in New Issue