Should fix about box in Windows

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@519 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Sonicadvance1 2008-09-13 17:40:21 +00:00
parent f75fafc1ce
commit b0aaac3890
1 changed files with 43 additions and 0 deletions

View File

@ -77,7 +77,50 @@ static u32 convert24bit(const u8* src) {
static u16 convert16bit(const u8* src) {
return (src[0] << 8) | src[1];
}
#ifdef _WIN32
HINSTANCE g_hInstance;
class wxDLLApp : public wxApp
{
bool OnInit()
{
return true;
}
};
IMPLEMENT_APP_NO_MAIN(wxDLLApp)
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
BOOL APIENTRY DllMain(HINSTANCE hinstDLL, // DLL module handle
DWORD dwReason, // reason called
LPVOID lpvReserved) // reserved
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
{ //use wxInitialize() if you don't want GUI instead of the following 12 lines
wxSetInstance((HINSTANCE)hinstDLL);
int argc = 0;
char **argv = NULL;
wxEntryStart(argc, argv);
if ( !wxTheApp || !wxTheApp->CallOnInit() )
return FALSE;
}
break;
case DLL_PROCESS_DETACH:
CloseConsole();
wxEntryCleanup(); //use wxUninitialize() if you don't want GUI
break;
default:
break;
}
g_hInstance = hinstDLL;
return TRUE;
}
#endif
//******************************************************************************
// Exports
//******************************************************************************