mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06: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:
@ -6,6 +6,7 @@
|
||||
#endif
|
||||
|
||||
#include "Globals.h"
|
||||
#include "Host.h"
|
||||
#include "Common.h"
|
||||
#include "ISOFile.h"
|
||||
#include "CPUDetect.h"
|
||||
@ -59,6 +60,23 @@ void Host_SetWaitCursor(bool enable){}
|
||||
|
||||
void Host_UpdateStatusBar(const char* _pText){}
|
||||
|
||||
void Host_SysMessage(const char *fmt, ...)
|
||||
{
|
||||
va_list list;
|
||||
char msg[512];
|
||||
|
||||
va_start(list, fmt);
|
||||
vsprintf(msg, fmt, list);
|
||||
va_end(list);
|
||||
|
||||
size_t len = strlen(msg);
|
||||
if (msg[len - 1] != '\n') {
|
||||
msg[len - 1] = '\n';
|
||||
msg[len] = '\0';
|
||||
}
|
||||
fprintf(stderr, msg);
|
||||
}
|
||||
|
||||
// Include SDL header so it can hijack main().
|
||||
#include <SDL.h>
|
||||
|
||||
|
Reference in New Issue
Block a user