From 946d238cadd61eb31990aa4965939b474f073c29 Mon Sep 17 00:00:00 2001 From: nakeee Date: Wed, 4 Mar 2009 16:56:49 +0000 Subject: [PATCH] added TLBHack GameConfig checkbox git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2543 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/Src/ISOProperties.cpp | 12 +++++++++++- Source/Core/DolphinWX/Src/ISOProperties.h | 5 ++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Source/Core/DolphinWX/Src/ISOProperties.cpp b/Source/Core/DolphinWX/Src/ISOProperties.cpp index 907e41a3f7..c0a1eef102 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.cpp +++ b/Source/Core/DolphinWX/Src/ISOProperties.cpp @@ -219,6 +219,7 @@ void CISOProperties::CreateGUIControls() 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); OptimizeQuantizers = new wxCheckBox(m_GameConfig, ID_OPTIMIZEQUANTIZERS, _("Optimize Quantizers"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); + TLBHack = new wxCheckBox(m_GameConfig, ID_TLBHACK, _("TLB Hack"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); EnableProgressiveScan = new wxCheckBox(m_GameConfig, ID_ENABLEPROGRESSIVESCAN, _("[Wii] Enable Progressive Scan"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); EnableWideScreen = new wxCheckBox(m_GameConfig, ID_ENABLEWIDESCREEN, _("[Wii] Enable WideScreen"), wxDefaultPosition, wxDefaultSize, wxCHK_3STATE|wxCHK_ALLOW_3RD_STATE_FOR_USER, wxDefaultValidator); @@ -264,6 +265,7 @@ void CISOProperties::CreateGUIControls() sCoreOverrides->Add(OverrideText, 0, wxEXPAND|wxALL, 5); sCoreOverrides->Add(UseDualCore, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(SkipIdle, 0, wxEXPAND|wxLEFT, 5); + sCoreOverrides->Add(TLBHack, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(OptimizeQuantizers, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(EnableProgressiveScan, 0, wxEXPAND|wxLEFT, 5); sCoreOverrides->Add(EnableWideScreen, 0, wxEXPAND|wxLEFT, 5); @@ -512,6 +514,11 @@ void CISOProperties::LoadGameConfig() OptimizeQuantizers->Set3StateValue((wxCheckBoxState)bTemp); else OptimizeQuantizers->Set3StateValue(wxCHK_UNDETERMINED); + + if (GameIni.Get("Core", "TLBHack", &bTemp)) + TLBHack->Set3StateValue((wxCheckBoxState)bTemp); + else + TLBHack->Set3StateValue(wxCHK_UNDETERMINED); if (GameIni.Get("Wii", "ProgressiveScan", &bTemp)) EnableProgressiveScan->Set3StateValue((wxCheckBoxState)bTemp); @@ -558,7 +565,10 @@ bool CISOProperties::SaveGameConfig() GameIni.DeleteKey("Core", "OptimizeQuantizers"); else GameIni.Set("Core", "OptimizeQuantizers", OptimizeQuantizers->Get3StateValue()); - + if (TLBHack->Get3StateValue() == wxCHK_UNDETERMINED) + GameIni.DeleteKey("Core", "TLBHack"); + else + GameIni.Set("Core", "TLBHack", TLBHack->Get3StateValue()); if (EnableProgressiveScan->Get3StateValue() == wxCHK_UNDETERMINED) GameIni.DeleteKey("Wii", "ProgressiveScan"); else diff --git a/Source/Core/DolphinWX/Src/ISOProperties.h b/Source/Core/DolphinWX/Src/ISOProperties.h index d42ac12354..56eb74bfcd 100644 --- a/Source/Core/DolphinWX/Src/ISOProperties.h +++ b/Source/Core/DolphinWX/Src/ISOProperties.h @@ -81,9 +81,7 @@ class CISOProperties : public wxDialog wxPanel *m_Filesystem; wxStaticText *OverrideText; - wxCheckBox *UseDualCore; - wxCheckBox *SkipIdle; - wxCheckBox *OptimizeQuantizers; + wxCheckBox *UseDualCore, *SkipIdle, *OptimizeQuantizers, *TLBHack; wxCheckBox *EnableProgressiveScan, *EnableWideScreen; // Wii wxButton *EditConfig; @@ -152,6 +150,7 @@ class CISOProperties : public wxDialog ID_OVERRIDE_TEXT, ID_USEDUALCORE, ID_IDLESKIP, + ID_TLBHACK, ID_ENABLEPROGRESSIVESCAN, ID_ENABLEWIDESCREEN, ID_OPTIMIZEQUANTIZERS,