mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -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:
@ -217,7 +217,7 @@ bool OpenGL_Create(SVideoInitialize &_VideoInitialize, int _iwidth, int _iheight
|
||||
|
||||
if (g_VideoInitialize.pWindowHandle == NULL)
|
||||
{
|
||||
SysMessage("failed to create window");
|
||||
g_VideoInitialize.pSysMessage("failed to create window");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -252,16 +252,3 @@ void __Log(int type, const char *fmt, ...)
|
||||
WriteConsole(hConsole, Msg, (DWORD)strlen(Msg), &tmp, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void 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));
|
||||
}
|
||||
|
@ -221,7 +221,6 @@ extern Statistics stats;
|
||||
void DebugLog(const char* _fmt, ...);
|
||||
void __Log(const char *format, ...);
|
||||
void __Log(int type, const char *format, ...);
|
||||
void SysMessage(const char *fmt, ...);
|
||||
void HandleGLError();
|
||||
|
||||
void InitLUTs();
|
||||
|
@ -181,10 +181,10 @@ bool FifoCommandRunnable(void)
|
||||
"This means one of the following:\n"
|
||||
"* The emulated GPU got desynced, disabling dual core can help\n"
|
||||
"* Command stream corrupted by some spurious memory bug\n"
|
||||
"* This really is an unknown opcode (unlikely)\n\n"
|
||||
"* This really is an unknown opcode (unlikely)\n"
|
||||
"* Some other sort of bug\n\n"
|
||||
"Dolphin will now likely crash or hang. Enjoy.", Cmd);
|
||||
SysMessage(szTemp);
|
||||
g_VideoInitialize.pSysMessage(szTemp);
|
||||
g_VideoInitialize.pLog(szTemp, TRUE);
|
||||
}
|
||||
break;
|
||||
|
@ -424,7 +424,7 @@ void Renderer::ReinitView(int nNewWidth, int nNewHeight)
|
||||
if (!OpenGL_Create(g_VideoInitialize, nNewWidth, nNewHeight)) {//nNewWidth&~7, nNewHeight&~7) ) {
|
||||
ERROR_LOG("Failed to recreate, reverting to old settings\n");
|
||||
if (!OpenGL_Create(g_VideoInitialize, oldwidth, oldheight)) {
|
||||
SysMessage("Failed to revert, exiting...\n");
|
||||
g_VideoInitialize.pSysMessage("Failed to revert, exiting...\n");
|
||||
// TODO - don't takedown the entire emu
|
||||
exit(0);
|
||||
}
|
||||
|
@ -392,7 +392,7 @@ void VertexLoader::ProcessFormat()
|
||||
{
|
||||
char temp[256];
|
||||
sprintf(temp,"%i %i %i", m_VtxDesc.Normal, m_VtxAttr.NormalFormat, m_VtxAttr.NormalElements);
|
||||
SysMessage("VertexLoader_Normal::GetFunction returned zero!");
|
||||
g_VideoInitialize.pSysMessage("VertexLoader_Normal::GetFunction returned zero!");
|
||||
}
|
||||
WriteCall(pFunc);
|
||||
|
||||
|
Reference in New Issue
Block a user