apply the changes from r5109 to the DX9 plugin aswell. the config dialog does not use wx yet, but the debugger does. Plus cleanup.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5121 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
j4ck.fr0st 2010-02-24 19:32:32 +00:00
parent b7e73102ca
commit d90d9976e8
1 changed files with 8 additions and 21 deletions

View File

@ -57,9 +57,6 @@ GFXDebuggerDX9 *m_DebuggerFrame = NULL;
#include "render.h" #include "render.h"
// Having to include this is TERRIBLY ugly. FIXME x100
#include "../../../Core/Core/Src/ConfigManager.h" // FIXME
#include "Utils.h" #include "Utils.h"
HINSTANCE g_hInstance = NULL; HINSTANCE g_hInstance = NULL;
@ -111,9 +108,9 @@ wxWindow* GetParentedWxWindow(HWND Parent)
} }
#endif #endif
#if defined(HAVE_WX) && HAVE_WX
void DllDebugger(HWND _hParent, bool Show) void DllDebugger(HWND _hParent, bool Show)
{ {
#if defined(HAVE_WX) && HAVE_WX
if (!m_DebuggerFrame) if (!m_DebuggerFrame)
m_DebuggerFrame = new GFXDebuggerDX9(GetParentedWxWindow(_hParent)); m_DebuggerFrame = new GFXDebuggerDX9(GetParentedWxWindow(_hParent));
@ -121,10 +118,8 @@ void DllDebugger(HWND _hParent, bool Show)
m_DebuggerFrame->Show(); m_DebuggerFrame->Show();
else else
m_DebuggerFrame->Hide(); m_DebuggerFrame->Hide();
}
#else
void DllDebugger(HWND _hParent, bool Show) { }
#endif #endif
}
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX
class wxDLLApp : public wxApp class wxDLLApp : public wxApp
@ -144,23 +139,16 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
{ {
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX
// Use wxInitialize() if you don't want GUI instead of the following 12 lines
wxSetInstance((HINSTANCE)hinstDLL); wxSetInstance((HINSTANCE)hinstDLL);
int argc = 0; wxInitialize();
char **argv = NULL; #endif
wxEntryStart(argc, argv);
if (!wxTheApp || !wxTheApp->CallOnInit())
return FALSE;
#endif
} }
break; break;
case DLL_PROCESS_DETACH: case DLL_PROCESS_DETACH:
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX
// This causes a "stop hang", if the gfx config dialog has been opened. wxUninitialize();
// Old comment: "Use wxUninitialize() if you don't want GUI" #endif
wxEntryCleanup();
#endif
break; break;
default: default:
break; break;
@ -172,7 +160,6 @@ BOOL APIENTRY DllMain(HINSTANCE hinstDLL, DWORD dwReason, LPVOID lpvReserved)
unsigned int Callback_PeekMessages() unsigned int Callback_PeekMessages()
{ {
//TODO: peek message
MSG msg; MSG msg;
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE))
{ {