Added "Edit Config" button to ISOProperties window.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1201 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
omegadox 2008-11-17 21:25:38 +00:00
parent 45e8450e9d
commit a26865be88
2 changed files with 14 additions and 0 deletions

View File

@ -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());
}
}

View File

@ -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<const DiscIO::SFileInfo *> Our_Files;
typedef std::vector<const DiscIO::SFileInfo *>::iterator fileIter;