diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index 7126a128a6..7ff1fd8446 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -159,11 +159,6 @@ void ConfigDialog::CreateGUIControls() m_RenderToMainWindow = new wxCheckBox(m_PageGeneral, ID_RENDERTOMAINWINDOW, wxT("Render to main window"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_RenderToMainWindow->SetValue(g_Config.renderToMainframe); m_StretchToFit = new wxCheckBox(m_PageGeneral, ID_STRETCHTOFIT, wxT("Stretch to fit"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); - m_StretchToFit->SetToolTip - (wxT("This will use the game's native resolution and stretch it to fill the" - "\nwindow instead of changing the internal display resolution. It" - "\nmay result in a slightly blurrier image, but it may also give a higher" - "\nFPS if you have a slow graphics card.")); m_StretchToFit->SetValue(g_Config.bStretchToFit); m_KeepAR = new wxCheckBox(m_PageGeneral, ID_KEEPAR, wxT("Keep 4:3 aspect ratio"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_KeepAR->SetValue(g_Config.bKeepAR); @@ -185,6 +180,23 @@ void ConfigDialog::CreateGUIControls() m_RenderBackend = new wxComboBox(m_PageGeneral, ID_RENDERBACKEND, wxEmptyString, wxDefaultPosition, wxDefaultSize, arrayStringFor_RenderBackend, 0, wxDefaultValidator); m_RenderBackend->SetValue(wxString::FromAscii(g_Config.iBackend)); + // Tool tips + m_Fullscreen->SetToolTip(wxT( + "This option use a separate rendering window and can only be used when" + " 'Render to main window' is unchecked. The only way to exit this mode\n" + " is with Alt + F4 (that also close Dolphin)." + )); + m_StretchToFit->SetToolTip(wxT( + "This will use the game's native resolution and stretch it to fill the" + "\nwindow instead of changing the internal display resolution. It" + "\nmay result in a slightly blurrier image, but it may also give a higher" + "\nFPS if you have a slow graphics card.")); + m_FullscreenCB->SetToolTip(wxT( + "Select resolution for the (separate window) fullscreen mode.")); + // This almost sounds like an unnecessary option + m_WindowResolutionCB->SetToolTip(wxT( + "Select initial resolution for the separate rendering window.")); + // Enhancements sbEnhancements = new wxStaticBoxSizer(wxVERTICAL, m_PageGeneral, wxT("Enhancements")); @@ -603,6 +615,11 @@ void ConfigDialog::TexturePathChange(wxFileDirPickerEvent& event) void ConfigDialog::UpdateGUI() { + // These options are for the separate rendering window + m_Fullscreen->Enable(!g_Config.renderToMainframe); + m_FullscreenCB->Enable(!g_Config.renderToMainframe); + m_WindowResolutionCB->Enable(!g_Config.renderToMainframe); + // Update screen size labels m_TextScreenWidth->SetLabel(wxString::Format("Width: %i", g_Config.iScreenWidth)); m_TextScreenHeight->SetLabel(wxString::Format("Height: %i", g_Config.iScreenHeight)); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index 2081510291..e917b55152 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -49,6 +49,9 @@ class ConfigDialog : public wxDialog void AddAAMode(int mode); void CreateGUIControls(); + // Combo box lists, this one needs to be public + wxArrayString arrayStringFor_FullscreenCB; + private: DECLARE_EVENT_TABLE(); @@ -79,7 +82,6 @@ class ConfigDialog : public wxDialog #ifndef _WIN32 wxCheckBox *m_HideCursor; #endif - wxArrayString arrayStringFor_FullscreenCB; wxComboBox *m_FullscreenCB; wxArrayString arrayStringFor_WindowResolutionCB; wxComboBox *m_WindowResolutionCB; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp index 313ff9af51..070e54cb54 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/main.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/main.cpp @@ -142,7 +142,7 @@ void DllConfig(HWND _hParent) char szBuffer[100]; sprintf(szBuffer,"%dx%d", dmi.dmPelsWidth, dmi.dmPelsHeight); std::string strBuffer(szBuffer); - // Create a check loop to check every pointer of resos to see if the res is added or not + // Create a check loop to check every pointer of resolutions to see if the res is added or not int b = 0; bool resFound = false; while (b < i && !resFound) @@ -151,8 +151,8 @@ void DllConfig(HWND _hParent) resFound = (resos[b] == strBuffer); b++; } + // Add the resolution if (!resFound) - // Add the res { resos[i] = strBuffer; i++; @@ -161,6 +161,14 @@ void DllConfig(HWND _hParent) } ZeroMemory(&dmi, sizeof(dmi)); } + + // Check if at least one resolution was found. If we don't and the resolution array is empty + // CreateGUIControls() will crash because the array is empty. + if (frame->arrayStringFor_FullscreenCB.size() == 0) + { + frame->AddFSReso(""); + frame->AddWindowReso(""); + } // ---------------------------- // Create the controls and show the window