From a26865be8889578cc7a59a0b2e9c4b175f74ecb7 Mon Sep 17 00:00:00 2001 From: omegadox Date: Mon, 17 Nov 2008 21:25:38 +0000 Subject: [PATCH] Added "Edit Config" button to ISOProperties window. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1201 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ISOProperties.cpp | 11 +++++++++++ Source/Core/DolphinWX/Src/ISOProperties.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 10716a7591..0b13a70aec 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -31,6 +31,7 @@ BEGIN_EVENT_TABLE(CISOProperties, wxDialog) EVT_TREE_ITEM_RIGHT_CLICK(ID_TREECTRL, CISOProperties::OnRightClickOnTree) EVT_MENU(IDM_EXTRACTFILE, CISOProperties::OnExtractFile) EVT_MENU(IDM_EXTRACTDIR, CISOProperties::OnExtractDir) + EVT_BUTTON(ID_EDITCONFIG, CISOProperties::OnEditConfig) END_EVENT_TABLE() DiscIO::IVolume *OpenISO = NULL; @@ -201,6 +202,7 @@ void CISOProperties::CreateGUIControls() // GameConfig editing - Core overrides and emulation state sbCoreOverrides = new wxStaticBoxSizer(wxVERTICAL, m_GameConfig, _("Game-Specific Settings")); sCoreOverrides = new wxBoxSizer(wxVERTICAL); + EditConfig = new wxButton(m_GameConfig, ID_EDITCONFIG, _("Edit Config"), wxDefaultPosition, wxDefaultSize); OverrideText = new wxStaticText(m_GameConfig, ID_OVERRIDE_TEXT, _("These settings override core Dolphin settings. The 3rd state means the game uses Dolphin's setting."), wxDefaultPosition, wxDefaultSize); UseDualCore = new wxCheckBox(m_GameConfig, ID_USEDUALCORE, _("Enable Dual Core"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); SkipIdle = new wxCheckBox(m_GameConfig, ID_IDLESKIP, _("Enable Idle Skipping"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); @@ -248,6 +250,7 @@ void CISOProperties::CreateGUIControls() sCoreOverrides->Add(OptimizeQuantizers, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(EnableWideScreen, 0, wxEXPAND|wxLEFT, 5); + sEmuState->Add(EditConfig, 0, wxALL, 0); sEmuState->AddStretchSpacer(); sEmuState->Add(EmuStateText, 0, wxALIGN_CENTER_VERTICAL|wxALL, 0); sEmuState->Add(EmuState, 0, wxEXPAND|wxALL, 0); @@ -529,3 +532,11 @@ bool CISOProperties::SaveGameConfig(std::string GameIniFile) // TODO save patches+cheats } + +void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event)) +{ + if (File::Exists(GameIniFile.c_str())) + { + File::Launch(GameIniFile.c_str()); + } +} \ No newline at end of file diff --git a/Source/Core/DolphinWX/Src/ISOProperties.h b/Source/Core/DolphinWX/Src/ISOProperties.h index 883e2ebdd1..5c6c53b5aa 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.h +++ b/Source/Core/DolphinWX/Src/ISOProperties.h @@ -88,6 +88,7 @@ class CISOProperties : public wxDialog wxButton *EditCheat; wxButton *AddCheat; wxButton *RemoveCheat; + wxButton *EditConfig; wxStaticText *m_NameText; wxStaticText *m_GameIDText; @@ -146,6 +147,7 @@ class CISOProperties : public wxDialog ID_EDITCHEAT, ID_ADDCHEAT, ID_REMOVECHEAT, + ID_EDITCONFIG, ID_NAME_TEXT, ID_GAMEID_TEXT, @@ -188,6 +190,7 @@ class CISOProperties : public wxDialog void OnExtractFile(wxCommandEvent& event); void OnExtractDir(wxCommandEvent& event); void SetRefresh(wxCommandEvent& event); + void OnEditConfig(wxCommandEvent& event); std::vector Our_Files; typedef std::vector::iterator fileIter;