[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; } GFX_INFO;
extern GFX_INFO gfx; extern GFX_INFO gfx;
extern wxWindow * GFXWindow;
extern bool no_dlist; extern bool no_dlist;
typedef void (FX_CALL *GRCOLORCOMBINEEXT) (GrCCUColor_t a, typedef void (FX_CALL *GRCOLORCOMBINEEXT) (GrCCUColor_t a,

View File

@ -77,7 +77,6 @@ std::ofstream rdp_err;
#endif #endif
GFX_INFO gfx; GFX_INFO gfx;
wxWindow * GFXWindow = NULL;
int to_fullscreen = FALSE; int to_fullscreen = FALSE;
int GfxInitDone = FALSE; int GfxInitDone = FALSE;
@ -1158,12 +1157,6 @@ bool wxDLLApp::OnInit()
void wxDLLApp::CleanUp() void wxDLLApp::CleanUp()
{ {
wxApp::CleanUp(); wxApp::CleanUp();
if (GFXWindow)
{
GFXWindow->SetHWND(NULL);
delete GFXWindow;
GFXWindow = NULL;
}
} }
#ifndef __WINDOWS__ #ifndef __WINDOWS__
@ -1209,8 +1202,6 @@ extern "C" int WINAPI DllMain(HINSTANCE hinst,
} }
else if (fdwReason == DLL_PROCESS_DETACH) else if (fdwReason == DLL_PROCESS_DETACH)
{ {
if (GFXWindow != NULL)
GFXWindow->SetHWND(NULL);
return DllUnload(); return DllUnload();
} }
return TRUE; return TRUE;
@ -1395,7 +1386,7 @@ void CALL CloseDLL(void)
{ {
ext_ghq_shutdown(); ext_ghq_shutdown();
settings.ghq_use = 0; settings.ghq_use = 0;
} }
#endif #endif
ReleaseGfx(); ReleaseGfx();
ZLUT_release(); ZLUT_release();
@ -1496,11 +1487,6 @@ int CALL InitiateGFX(GFX_INFO Gfx_Info)
debug_init(); // Initialize debugger debug_init(); // Initialize debugger
gfx = Gfx_Info; gfx = Gfx_Info;
#ifdef __WINDOWS__
if (GFXWindow == NULL)
GFXWindow = new wxWindow();
GFXWindow->SetHWND(gfx.hWnd);
#endif
#ifdef WINPROC_OVERRIDE #ifdef WINPROC_OVERRIDE
// [H.Morii] inject our own winproc so that "alt-enter to fullscreen" // [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); settings.ucode = GetSetting(Set_ucode);
ReleaseGfx(); 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 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); settings.ucode = GetSetting(Set_ucode);
ReleaseGfx(); 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 ucode_error_report = FALSE; // don't report any more ucode errors from this game
} }
@ -793,10 +793,14 @@ EXPORT void CALL ProcessDList(void)
} }
#endif #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; exception = TRUE;
}
else else
{
to_fullscreen = TRUE; to_fullscreen = TRUE;
}
return; return;
} }
#endif #endif