[Glide64] Remove GFXWindow

This commit is contained in:
zilmar 2016-01-25 18:00:01 +11:00
parent ffc6c41201
commit 9b6f159d75
3 changed files with 8 additions and 19 deletions

View File

@ -364,7 +364,6 @@ extern "C" {
} GFX_INFO;
extern GFX_INFO gfx;
extern wxWindow * GFXWindow;
extern bool no_dlist;
typedef void (FX_CALL *GRCOLORCOMBINEEXT) (GrCCUColor_t a,

View File

@ -77,7 +77,6 @@ std::ofstream rdp_err;
#endif
GFX_INFO gfx;
wxWindow * GFXWindow = NULL;
int to_fullscreen = FALSE;
int GfxInitDone = FALSE;
@ -1158,12 +1157,6 @@ bool wxDLLApp::OnInit()
void wxDLLApp::CleanUp()
{
wxApp::CleanUp();
if (GFXWindow)
{
GFXWindow->SetHWND(NULL);
delete GFXWindow;
GFXWindow = NULL;
}
}
#ifndef __WINDOWS__
@ -1209,8 +1202,6 @@ extern "C" int WINAPI DllMain(HINSTANCE hinst,
}
else if (fdwReason == DLL_PROCESS_DETACH)
{
if (GFXWindow != NULL)
GFXWindow->SetHWND(NULL);
return DllUnload();
}
return TRUE;
@ -1395,7 +1386,7 @@ void CALL CloseDLL(void)
{
ext_ghq_shutdown();
settings.ghq_use = 0;
}
}
#endif
ReleaseGfx();
ZLUT_release();
@ -1496,11 +1487,6 @@ int CALL InitiateGFX(GFX_INFO Gfx_Info)
debug_init(); // Initialize debugger
gfx = Gfx_Info;
#ifdef __WINDOWS__
if (GFXWindow == NULL)
GFXWindow = new wxWindow();
GFXWindow->SetHWND(gfx.hWnd);
#endif
#ifdef WINPROC_OVERRIDE
// [H.Morii] inject our own winproc so that "alt-enter to fullscreen"

View File

@ -326,7 +326,7 @@ void microcheck()
settings.ucode = GetSetting(Set_ucode);
ReleaseGfx();
wxMessageBox(stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), "Error", wxOK | wxICON_EXCLAMATION, GFXWindow);
MessageBox(gfx.hWnd, stdstr_f("Error: uCode crc not found in INI, using currently selected uCode\n\n%08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION);
ucode_error_report = FALSE; // don't report any more ucode errors from this game
}
@ -335,7 +335,7 @@ void microcheck()
settings.ucode = GetSetting(Set_ucode);
ReleaseGfx();
wxMessageBox(stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), "Error", wxOK | wxICON_EXCLAMATION, GFXWindow);
MessageBox(gfx.hWnd, stdstr_f("Error: Unsupported uCode!\n\ncrc: %08lx", uc_crc).c_str(), "Error", MB_OK | MB_ICONEXCLAMATION);
ucode_error_report = FALSE; // don't report any more ucode errors from this game
}
@ -793,10 +793,14 @@ EXPORT void CALL ProcessDList(void)
}
#endif
}
if (wxMessageBox(_T("The GFX plugin caused an exception and has been disabled.\nWould you like to turn it back on and attempt to continue?"), _T("Glide64 Exception"), wxYES_NO|wxICON_EXCLAMATION, GFXWindow) == wxNO)
if (MessageBox(gfx.hWnd, "The GFX plugin caused an exception and has been disabled.\nWould you like to turn it back on and attempt to continue?","Glide64 Exception", MB_YESNO|MB_ICONEXCLAMATION) == MB_NO)
{
exception = TRUE;
}
else
{
to_fullscreen = TRUE;
}
return;
}
#endif