mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 01:28:57 +00:00
Moved SysMessage() from the video plugin into the main app, so the GUI and non-GUI executable can handle it in a different way. This fixes a crash in DolphinNoGUI when SysMessage() was called and tried to use a non-initialized wxWidgets.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@489 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
38ff37539d
commit
54c2a07de5
9 changed files with 39 additions and 19 deletions
|
@ -22,6 +22,7 @@
|
|||
#endif
|
||||
#include "CPUDetect.h"
|
||||
#include "Globals.h"
|
||||
#include "Host.h"
|
||||
#include "Common.h"
|
||||
#include "IniFile.h"
|
||||
#include "Main.h"
|
||||
|
@ -274,3 +275,16 @@ void Host_UpdateStatusBar(const char* _pText)
|
|||
|
||||
wxPostEvent(main_frame, event);
|
||||
}
|
||||
|
||||
void Host_SysMessage(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0;
|
||||
wxMessageBox(wxString::FromAscii(msg));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue