diff --git a/Source/Core/DolphinWX/Src/Config.cpp b/Source/Core/DolphinWX/Src/Config.cpp index c26ccd5fd3..4ff5832675 100644 --- a/Source/Core/DolphinWX/Src/Config.cpp +++ b/Source/Core/DolphinWX/Src/Config.cpp @@ -113,10 +113,11 @@ void SConfig::LoadSettings() ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str()); ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin, m_DefaultPADPlugin.c_str()); - ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true); - ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true); - ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, false); - ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, true); + ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true); + ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true); + ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, false); + ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, true); + ini.Get("Core", "DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM); ini.Get("Core", "OptimizeQuantizers", &m_LocalCoreStartupParameter.bOptimizeQuantizers, true); } } diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index a88a5b0e5c..7f723b821c 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -86,6 +86,7 @@ EVT_MENU(IDM_HELPGOOGLECODE, CFrame::OnHelp) EVT_MENU(IDM_HELPABOUT, CFrame::OnHelp) EVT_MENU(wxID_REFRESH, CFrame::OnRefresh) EVT_MENU(IDM_PLAY, CFrame::OnPlay) +EVT_MENU(IDM_PAUSE, CFrame::OnPlay) EVT_MENU(IDM_STOP, CFrame::OnStop) EVT_MENU(IDM_PLUGIN_OPTIONS, CFrame::OnPluginOptions) EVT_MENU(IDM_CONFIG_GFX_PLUGIN, CFrame::OnPluginGFX) @@ -217,7 +218,7 @@ void CFrame::CreateMenu() pOptionsMenu->Append(IDM_CONFIG_DSP_PLUGIN, _T("&DSP settings")); pOptionsMenu->Append(IDM_CONFIG_PAD_PLUGIN, _T("&PAD settings")); pOptionsMenu->AppendSeparator(); - pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen")); + pOptionsMenu->Append(IDM_TOGGLE_FULLSCREEN, _T("&Fullscreen\tEsc")); pOptionsMenu->AppendCheckItem(IDM_TOGGLE_DUALCORE, _T("&Dual-core (unstable!)")); pOptionsMenu->Check(IDM_TOGGLE_DUALCORE, SConfig::GetInstance().m_LocalCoreStartupParameter.bUseDualCore); m_pMenuBar->Append(pOptionsMenu, _T("&Options")); @@ -254,7 +255,7 @@ void CFrame::PopulateToolbar(wxToolBar* toolBar) toolBar->AddTool(wxID_REFRESH, _T("Refresh"), m_Bitmaps[Toolbar_Refresh], _T("Refresh")); toolBar->AddTool(IDM_BROWSE, _T("Browse"), m_Bitmaps[Toolbar_Browse], _T("Browse for an ISO directory...")); toolBar->AddSeparator(); - toolBar->AddTool(IDM_PLAY, _T("Play"), m_Bitmaps[Toolbar_Play], _T("Play")); + m_pToolPlay = toolBar->AddTool(IDM_PLAY, _T("Play"), m_Bitmaps[Toolbar_Play], _T("Play")); toolBar->SetToolDisabledBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Play_Dis]); toolBar->AddTool(IDM_STOP, _T("Stop"), m_Bitmaps[Toolbar_Stop], _T("Stop")); toolBar->SetToolDisabledBitmap(IDM_STOP, m_Bitmaps[Toolbar_Stop_Dis]); @@ -575,6 +576,11 @@ void CFrame::UpdateGUI() GetToolBar()->EnableTool(IDM_STOP, false); GetToolBar()->EnableTool(IDM_PLAY, false); + m_pToolPlay->SetShortHelp(_T("Play")); + m_pToolPlay->SetLabel(_T("Play")); + + m_pMenuItemPlay->SetText(_T("Play")); + m_pMenuItemPlay->Enable(false); m_pMenuItemStop->Enable(false); m_pMenuItemLoad->Enable(false); @@ -595,21 +601,24 @@ void CFrame::UpdateGUI() if (Core::GetState() == Core::CORE_RUN) { - GetToolBar()->SetToolNormalBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Pause]); - GetToolBar()->SetToolShortHelp(IDM_PLAY, _T("Pause")); + m_pToolPlay->SetNormalBitmap(m_Bitmaps[Toolbar_Pause]); + m_pToolPlay->SetShortHelp(_T("Pause")); + m_pToolPlay->SetLabel(_T("Pause")); m_pMenuItemPlay->SetText(_T("Pause")); } else { - GetToolBar()->SetToolNormalBitmap(IDM_PLAY, m_Bitmaps[Toolbar_Play]); - GetToolBar()->SetToolShortHelp(IDM_PLAY, _T("Play")); + m_pToolPlay->SetNormalBitmap(m_Bitmaps[Toolbar_Play]); + m_pToolPlay->SetShortHelp(_T("Play")); + m_pToolPlay->SetLabel(_T("Play")); m_pMenuItemPlay->SetText(_T("Play")); } } + GetToolBar()->Realize(); } - + // gamelistctrl { if (Core::GetState() == Core::CORE_UNINITIALIZED) diff --git a/Source/Core/DolphinWX/Src/Frame.h b/Source/Core/DolphinWX/Src/Frame.h index 6b6b5d777d..a032347631 100644 --- a/Source/Core/DolphinWX/Src/Frame.h +++ b/Source/Core/DolphinWX/Src/Frame.h @@ -83,6 +83,8 @@ class CFrame wxMenuItem* m_pMenuItemLoad; wxMenuItem* m_pMenuItemSave; + wxToolBarToolBase* m_pToolPlay; + wxBusyInfo* m_pBootProcessDialog; void UpdateGUI(); diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.cpp b/Source/Core/DolphinWX/Src/GameListCtrl.cpp index da9da12257..f07a81dec2 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.cpp +++ b/Source/Core/DolphinWX/Src/GameListCtrl.cpp @@ -46,6 +46,7 @@ EVT_LIST_ITEM_ACTIVATED(LIST_CTRL, CGameListCtrl::OnActivated) EVT_LIST_COL_END_DRAG(LIST_CTRL, CGameListCtrl::OnColEndDrag) EVT_MENU(IDM_EDITPATCHFILE, CGameListCtrl::OnEditPatchFile) EVT_MENU(IDM_OPENCONTAININGFOLDER, CGameListCtrl::OnOpenContainingFolder) +EVT_MENU(IDM_SETDEFAULTGCM, CGameListCtrl::OnSetDefaultGCM) END_EVENT_TABLE() @@ -340,6 +341,7 @@ CGameListCtrl::OnRightClick(wxMouseEvent& event) std::string menu_text = StringFromFormat("Edit &patch file: %s.ini", unique_id.c_str()); popupMenu.Append(IDM_EDITPATCHFILE, wxString::FromAscii(menu_text.c_str())); //Pretty much everything in wxwidgets is a wxString, try to convert to those first! popupMenu.Append(IDM_OPENCONTAININGFOLDER, wxString::FromAscii("Open &containing folder")); + popupMenu.Append(IDM_SETDEFAULTGCM, wxString::FromAscii("Set as &default ISO")); PopupMenu(&popupMenu); } } @@ -383,6 +385,15 @@ CGameListCtrl::OnOpenContainingFolder(wxCommandEvent& WXUNUSED (event)) { File::Explore(path); } +void +CGameListCtrl::OnSetDefaultGCM(wxCommandEvent& WXUNUSED (event)) { + const CISOFile *iso = GetSelectedISO(); + if (!iso) + return; + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultGCM = iso->GetFileName(); + SConfig::GetInstance().SaveSettings(); +} + void CGameListCtrl::OnEditPatchFile(wxCommandEvent& WXUNUSED (event)) { diff --git a/Source/Core/DolphinWX/Src/GameListCtrl.h b/Source/Core/DolphinWX/Src/GameListCtrl.h index 7148027562..e85e90af8a 100644 --- a/Source/Core/DolphinWX/Src/GameListCtrl.h +++ b/Source/Core/DolphinWX/Src/GameListCtrl.h @@ -67,6 +67,7 @@ class CGameListCtrl : public wxListCtrl void OnSize(wxSizeEvent& event); void OnEditPatchFile(wxCommandEvent& event); void OnOpenContainingFolder(wxCommandEvent& event); + void OnSetDefaultGCM(wxCommandEvent& event); virtual bool MSWDrawSubItem(wxPaintDC& rPaintDC, int item, int subitem); diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h index 89ff5a2176..bdfbfd9d6d 100644 --- a/Source/Core/DolphinWX/Src/Globals.h +++ b/Source/Core/DolphinWX/Src/Globals.h @@ -43,11 +43,13 @@ enum IDM_LOADSLOT9, IDM_LOADSLOT10, IDM_PLAY, + IDM_PAUSE, IDM_STOP, IDM_BROWSE, IDM_MEMCARD, IDM_EDITPATCHFILE, IDM_OPENCONTAININGFOLDER, + IDM_SETDEFAULTGCM, IDM_PLUGIN_OPTIONS, IDM_CONFIG_GFX_PLUGIN, IDM_CONFIG_DSP_PLUGIN, diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp index a1881adbb4..b5ed00b2af 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.cpp @@ -33,6 +33,7 @@ BEGIN_EVENT_TABLE(ConfigDialog,wxDialog) EVT_CHECKBOX(ID_FORCEFILTERING,ConfigDialog::ForceFilteringCheck) EVT_CHECKBOX(ID_FORCEANISOTROPY,ConfigDialog::ForceAnisotropyCheck) EVT_CHECKBOX(ID_WIREFRAME,ConfigDialog::WireframeCheck) + EVT_CHECKBOX(ID_SHOWFPS,ConfigDialog::ShowFPSCheck) EVT_CHECKBOX(ID_STATISTICS,ConfigDialog::OverlayCheck) EVT_CHECKBOX(ID_SHADERERRORS,ConfigDialog::ShowShaderErrorsCheck) EVT_CHECKBOX(ID_TEXFMTOVERLAY,ConfigDialog::TexFmtOverlayChange) @@ -113,6 +114,9 @@ void ConfigDialog::CreateGUIControls() m_ForceFiltering->SetValue(g_Config.bForceFiltering); //page3 + m_ShowFPS = new wxCheckBox(m_PageAdvanced, ID_SHOWFPS, wxT("Overlay FPS"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); + m_ShowFPS->SetValue(g_Config.bShowFPS); + m_Statistics = new wxCheckBox(m_PageAdvanced, ID_STATISTICS, wxT("Overlay some statistics"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator); m_Statistics->SetValue(g_Config.bOverlayStats); @@ -170,11 +174,12 @@ void ConfigDialog::CreateGUIControls() sPage3->SetNonFlexibleGrowMode(wxFLEX_GROWMODE_SPECIFIED); sPage3->Add(m_Wireframe, wxGBPosition(0, 0), wxGBSpan(1, 1), wxALL, 5); sPage3->Add(m_ShaderErrors, wxGBPosition(1, 0), wxGBSpan(1, 1), wxALL, 5); - sPage3->Add(m_Statistics, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 5); - sPage3->Add(m_TexFmtOverlay, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 5); - sPage3->Add(m_TexFmtCenter, wxGBPosition(3, 1), wxGBSpan(1, 1), wxALL, 5); - sPage3->Add(m_DumpTextures, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5); - sPage3->Add(m_TexturePath, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_ShowFPS, wxGBPosition(2, 0), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_Statistics, wxGBPosition(3, 0), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_TexFmtOverlay, wxGBPosition(4, 0), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_TexFmtCenter, wxGBPosition(4, 1), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_DumpTextures, wxGBPosition(5, 0), wxGBSpan(1, 1), wxALL, 5); + sPage3->Add(m_TexturePath, wxGBPosition(5, 1), wxGBSpan(1, 1), wxALL, 5); m_PageAdvanced->SetSizer(sPage3); sPage3->Layout(); @@ -261,6 +266,11 @@ void ConfigDialog::ShowShaderErrorsCheck(wxCommandEvent& event) g_Config.bShowShaderErrors = m_ShaderErrors->IsChecked(); } +void ConfigDialog::ShowFPSCheck(wxCommandEvent& event) +{ + g_Config.bShowFPS = m_ShowFPS->IsChecked(); +} + void ConfigDialog::OverlayCheck(wxCommandEvent& event) { g_Config.bOverlayStats = m_Statistics->IsChecked(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h index 859da4c453..1798b661eb 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/GUI/ConfigDlg.h @@ -55,6 +55,7 @@ class ConfigDialog : public wxDialog void ForceFilteringCheck(wxCommandEvent& event); void ForceAnisotropyCheck(wxCommandEvent& event); void WireframeCheck(wxCommandEvent& event); + void ShowFPSCheck(wxCommandEvent& event); void OverlayCheck(wxCommandEvent& event); void ShowShaderErrorsCheck(wxCommandEvent& event); void TexFmtOverlayChange(wxCommandEvent& event); @@ -70,6 +71,7 @@ class ConfigDialog : public wxDialog wxCheckBox *m_TexFmtCenter; wxCheckBox *m_TexFmtOverlay; wxCheckBox *m_Statistics; + wxCheckBox *m_ShowFPS; wxCheckBox *m_ShaderErrors; wxCheckBox *m_Wireframe; wxCheckBox *m_ForceAnisotropy; @@ -95,6 +97,7 @@ class ConfigDialog : public wxDialog ID_SHADERERRORS, ID_TEXFMTCENTER, ID_TEXFMTOVERLAY, + ID_SHOWFPS, ID_STATISTICS, ID_DUMPTEXTURES, ID_WIREFRAME, diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp index e7cfe51f32..3ca0535e0d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Globals.cpp @@ -52,16 +52,17 @@ void Config::Load() IniFile iniFile; iniFile.Load("gfx_opengl.ini"); iniFile.Get("Hardware", "Adapter", &iAdapter, 0); + if (iAdapter == -1) + iAdapter = 0; iniFile.Get("Hardware", "WindowedRes", &temp, 0); strcpy(iWindowedRes, temp.c_str()); iniFile.Get("Hardware", "FullscreenRes", &temp, 0); strcpy(iFSResolution, temp.c_str()); iniFile.Get("Hardware", "Fullscreen", &bFullscreen, 0); iniFile.Get("Hardware", "RenderToMainframe", &renderToMainframe, 0); - if (iAdapter == -1) - iAdapter = 0; - iniFile.Get("Settings", "OverlayStats", &bOverlayStats, false); + iniFile.Get("Settings", "ShowFPS", &bShowFPS, false); + iniFile.Get("Settings", "OverlayStats", &bOverlayStats, false); iniFile.Get("Settings", "Postprocess", &iPostprocessEffect, 0); iniFile.Get("Settings", "DLOptimize", &iCompileDLsLevel, 0); iniFile.Get("Settings", "DumpTextures", &bDumpTextures, 0); @@ -83,8 +84,7 @@ void Config::Load() iniFile.Get("Enhancements", "ForceFiltering", &bForceFiltering, 0); iniFile.Get("Enhancements", "ForceMaxAniso", &bForceMaxAniso, 0); - iniFile.Get("Enhancements", "StretchToFit", &bStretchToFit, false); - iniFile.Get("Enhancements", "ShowFPS", &bShowFPS, false); + iniFile.Get("Enhancements", "StretchToFit", &bStretchToFit, false); } void Config::Save() @@ -97,21 +97,21 @@ void Config::Save() iniFile.Set("Hardware", "Fullscreen", bFullscreen); iniFile.Set("Hardware", "RenderToMainframe", renderToMainframe); - iniFile.Set("Settings", "OverlayStats", bOverlayStats); + iniFile.Set("Settings", "ShowFPS", bShowFPS); + iniFile.Set("Settings", "OverlayStats", bOverlayStats); iniFile.Set("Settings", "Postprocess", iPostprocessEffect); iniFile.Set("Settings", "DLOptimize", iCompileDLsLevel); iniFile.Set("Settings", "DumpTextures", bDumpTextures); iniFile.Set("Settings", "ShowShaderErrors", bShowShaderErrors); iniFile.Set("Settings", "Multisample", iMultisampleMode); iniFile.Set("Settings", "TexDumpPath", texDumpPath); - iniFile.Set("Settings", "TexFmtOverlayEnable", bTexFmtOverlayEnable); iniFile.Set("Settings", "TexFmtOverlayCenter", bTexFmtOverlayCenter); iniFile.Set("Enhancements", "ForceFiltering", bForceFiltering); iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso); - iniFile.Set("Enhancements", "StretchToFit", bStretchToFit); - iniFile.Set("Enhancements", "ShowFPS", bShowFPS); + iniFile.Set("Enhancements", "StretchToFit", bStretchToFit); + iniFile.Save("gfx_opengl.ini"); }