Fixed ogl config on linux, please when you change code, make sure you changed all the ifdef cases

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2380 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee 2009-02-22 22:57:56 +00:00
parent 68f5cc1873
commit cc3073b528
1 changed files with 15 additions and 19 deletions

View File

@ -98,19 +98,18 @@ void SetDllGlobals(PLUGIN_GLOBALS* _pPluginGlobals)
} }
// This is used for the fuctions right below here, in DllConfig() // This is used for the fuctions right below here, in DllConfig()
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX && defined _WIN32
WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst); WXDLLIMPEXP_BASE void wxSetInstance(HINSTANCE hInst);
extern HINSTANCE g_hInstance; extern HINSTANCE g_hInstance;
#endif #endif
void DllConfig(HWND _hParent) void DllConfig(HWND _hParent)
{ {
#if defined(HAVE_WX) && HAVE_WX #if defined(HAVE_WX) && HAVE_WX
// This is needed because now we use wxEntryCleanup() when closing the configuration window // This is needed because now we use wxEntryCleanup() when closing the configuration window
if (!wxTheApp || !wxTheApp->CallOnInit()) if (!wxTheApp || !wxTheApp->CallOnInit())
{ {
#if defined(_WIN32) #ifdef _WIN32
wxSetInstance((HINSTANCE)g_hInstance); wxSetInstance((HINSTANCE)g_hInstance);
#endif #endif
int argc = 0; int argc = 0;
@ -118,6 +117,7 @@ void DllConfig(HWND _hParent)
wxEntryStart(argc, argv); wxEntryStart(argc, argv);
} }
#endif #endif
//Console::Open(); //Console::Open();
#if defined(_WIN32) && defined(HAVE_WX) && HAVE_WX #if defined(_WIN32) && defined(HAVE_WX) && HAVE_WX
@ -180,14 +180,18 @@ void DllConfig(HWND _hParent)
// Hm, why does this code show it modally? // Hm, why does this code show it modally?
config_dialog = new ConfigDialog(NULL); config_dialog = new ConfigDialog(NULL);
g_Config.Load(); g_Config.Load();
config_dialog->ShowModal(); config_dialog->CreateGUIControls();
config_dialog->Show();
delete config_dialog; delete config_dialog;
config_dialog = NULL; config_dialog = NULL;
#elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XXF86VM) &&\ #elif defined(HAVE_X11) && HAVE_X11 && defined(HAVE_XXF86VM) &&\
HAVE_XXF86VM && defined(HAVE_WX) && HAVE_WX HAVE_XXF86VM && defined(HAVE_WX) && HAVE_WX
ConfigDialog config_dialog(NULL); wxWindow *win = new wxWindow();
ConfigDialog *config_dialog = new ConfigDialog(win);
g_Config.Load(); g_Config.Load();
int glxMajorVersion, glxMinorVersion; int glxMajorVersion, glxMinorVersion;
int vidModeMajorVersion, vidModeMinorVersion; int vidModeMajorVersion, vidModeMinorVersion;
@ -211,17 +215,17 @@ void DllConfig(HWND _hParent)
{ {
char temp[32]; char temp[32];
sprintf(temp,"%dx%d", modes[i]->hdisplay, modes[i]->vdisplay); sprintf(temp,"%dx%d", modes[i]->hdisplay, modes[i]->vdisplay);
config_dialog.AddFSReso(temp); config_dialog->AddFSReso(temp);
config_dialog.AddWindowReso(temp);//Add same to Window ones, since they should be nearly all that's needed config_dialog->AddWindowReso(temp);//Add same to Window ones, since they should be nearly all that's needed
px = modes[i]->hdisplay;//Used to remove repeating from different screen depths px = modes[i]->hdisplay;//Used to remove repeating from different screen depths
py = modes[i]->vdisplay; py = modes[i]->vdisplay;
} }
} }
} }
XFree(modes); XFree(modes);
config_dialog->CreateGUIControls();
// Hm, why does this code show it modally? // Hm, why does this code show it modally?
config_dialog.ShowModal(); config_dialog->Show();
#endif #endif
} }
@ -301,9 +305,7 @@ void Video_Prepare(void)
void Shutdown(void) void Shutdown(void)
{ {
Fifo_Shutdown(); Fifo_Shutdown();
#ifndef SETUP_TIMER_WAITING // This is not compatible, it crashes after the second Stop TextureConverter::Shutdown();
TextureConverter::Shutdown();
#endif
VertexLoaderManager::Shutdown(); VertexLoaderManager::Shutdown();
VertexShaderCache::Shutdown(); VertexShaderCache::Shutdown();
VertexShaderManager::Shutdown(); VertexShaderManager::Shutdown();
@ -312,14 +314,8 @@ void Shutdown(void)
VertexManager::Shutdown(); VertexManager::Shutdown();
TextureMngr::Shutdown(); TextureMngr::Shutdown();
OpcodeDecoder_Shutdown(); OpcodeDecoder_Shutdown();
#ifndef SETUP_TIMER_WAITING // This is not compatible, it may crashes after a Stop Renderer::Shutdown();
Renderer::Shutdown();
#endif
OpenGL_Shutdown(); OpenGL_Shutdown();
#ifdef SETUP_TIMER_WAITING
// Do we ever destroy the window?
EmuWindow::Close();
#endif
} }