From 41b02601d72718da24808b75e9b2653e3263c91a Mon Sep 17 00:00:00 2001 From: Sonicadvance1 Date: Fri, 24 Apr 2009 01:30:45 +0000 Subject: [PATCH] Make OSX running more stable with a single line change. You can't pass nil to makeKeyAndOrderFront and expect it to work well. Also the checking for GL version didn't work because the GL version is defined for all it supports, so first we check if we support GL version 1.3 and if we don't, check if we support 1.2 and set software rendering. Little bit of cleaning in the GL config as well, the checkboxes are default enabled and max aniso wasn't using it's own text ID git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3058 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp | 8 ++------ Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h | 1 + Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m | 12 ++++++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 9b2cc92011..7396ed57f6 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -206,6 +206,7 @@ void ConfigDialog::CreateGUIControls() m_MSAAModeCB->Append(wxT("16xQ CSAA")); m_MSAAModeCB->SetSelection(g_Config.iMultisampleMode); + // Tool tips m_Fullscreen->SetToolTip(wxT( "This will create a Fullscreen window using the chosen Fullscreen resolution." @@ -228,7 +229,7 @@ void ConfigDialog::CreateGUIControls() // Enhancements sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements")); - wxStaticText *AnisoText = new wxStaticText(m_PageGeneral, ID_WMTEXT, wxT("Anisotropic filter:"), wxDefaultPosition, wxDefaultSize, 0); + wxStaticText *AnisoText = new wxStaticText(m_PageGeneral, ID_MAXANISOTROPYTEXT, wxT("Anisotropic filter:"), wxDefaultPosition, wxDefaultSize, 0); m_MaxAnisotropyCB = new wxChoice(m_PageGeneral, ID_MAXANISOTROPY, wxDefaultPosition, wxDefaultSize, arrayStringFor_MaxAnisotropyCB, 0, wxDefaultValidator); m_MaxAnisotropyCB->Append(wxT("1x")); m_MaxAnisotropyCB->Append(wxT("2x")); @@ -360,11 +361,6 @@ void ConfigDialog::CreateGUIControls() m_ProjectionHax1 = new wxCheckBox(m_PageAdvanced, ID_PROJECTIONHACK1, wxT("ZTP Bloom hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_SMGh = new wxCheckBox(m_PageAdvanced, ID_SMGHACK, wxT("Mario Galaxy Hack"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); - // Disabled or enabled - m_SafeTextureCache->Enable(true); - m_ProjectionHax1->Enable(true); - m_SMGh->Enable(true); - // Default values m_SafeTextureCache->SetValue(g_Config.bSafeTextureCache); m_ProjectionHax1->SetValue(g_Config.bProjectionHax1); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index 0b4ed94bd0..e6547d1391 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -145,6 +145,7 @@ class ConfigDialog : public wxDialog ID_WINDOWRESOLUTIONCB, ID_FORCEFILTERING, ID_MAXANISOTROPY, + ID_MAXANISOTROPYTEXT, ID_MSAAMODECB, ID_MSAAMODETEXT, diff --git a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m index 3c97703758..1934183cd8 100755 --- a/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m +++ b/Source/Plugins/Plugin_VideoOGL/Src/cocoaGL.m @@ -11,7 +11,7 @@ NSWindow *cocoaGLCreateWindow(int w,int h) defer:FALSE]; [window setTitle:@"Dolphin on OSX"]; - [window makeKeyAndOrderFront: nil]; + //[window makeKeyAndOrderFront: nil]; [pool release]; @@ -69,11 +69,15 @@ NSOpenGLContext* cocoaGLInit(int mode) attr[i++] = mode; attr[i++] = NSOpenGLPFASamples; attr[i++] = 1; +#ifdef GL_VERSION_1_3 + +#else #ifdef GL_VERSION_1_2 - #warning "your car support ogl 1.2, dolphin wil use software renderer" +#warning "your card only supports ogl 1.2, dolphin will use software renderer" //if opengl < 1.3 uncomment this twoo lines to use software renderer - attr[i++] = NSOpenGLPFARendererID; - attr[i++] = kCGLRendererGenericFloatID; + attr[i++] = NSOpenGLPFARendererID; + attr[i++] = kCGLRendererGenericFloatID; +#endif #endif attr[i++] = NSOpenGLPFAScreenMask; attr[i++] = CGDisplayIDToOpenGLDisplayMask(CGMainDisplayID());