summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJohn Peterson <john.s.peterson@live.com>2013-04-29 12:00:23 -0400
committerRachel Bryk <RachelBryk@gmail.com>2013-04-29 12:00:23 -0400
commit8dbe2366063f74b3f15dcdf18dcaea91e4bb1a61 (patch)
tree39d045fb9a885a01f7f4262c86d3ee5942e652ca /Source/Core
parent4f5832827e8bf52077f74d01403f96b29d06b5e3 (diff)
Fixing or disabling the "Download Codes (WiiRD Database)" button problem
The "Download Codes (WiiRD Database)" button is enabled (and its click return silently without an effect) when "Tools → Cheats Manager" is opened when there's a running emulation for which there's no "[Gecko]" ini section, confusing the user about the reason for not downloading codes or showing an error when there's no running emulation Solution when there's a running emulation: fix the button when there's no running emulation: disable the button (to indicate to the user that this button must be clicked elsewhere, in the ISO settings dialog, the user will realise or remember)
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/DolphinWX/Src/CheatsWindow.cpp2
-rw-r--r--Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp6
-rw-r--r--Source/Core/DolphinWX/Src/GeckoCodeDiag.h2
3 files changed, 7 insertions, 3 deletions
diff --git a/Source/Core/DolphinWX/Src/CheatsWindow.cpp b/Source/Core/DolphinWX/Src/CheatsWindow.cpp
index e3a51208b4..ba4918c917 100644
--- a/Source/Core/DolphinWX/Src/CheatsWindow.cpp
+++ b/Source/Core/DolphinWX/Src/CheatsWindow.cpp
@@ -39,7 +39,7 @@ wxCheatsWindow::wxCheatsWindow(wxWindow* const parent)
{
m_gameini_path = File::GetUserPath(D_GAMECONFIG_IDX) + vol->GetUniqueID() + ".ini";
m_gameini.Load(m_gameini_path);
- m_geckocode_panel->LoadCodes(m_gameini);
+ m_geckocode_panel->LoadCodes(m_gameini, Core::g_CoreStartupParameter.GetUniqueID());
}
}
diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp
index 9f96956abc..12685fac75 100644
--- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp
+++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.cpp
@@ -41,7 +41,8 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent)
// button sizer
wxBoxSizer* const sizer_buttons = new wxBoxSizer(wxHORIZONTAL);
- wxButton* const btn_download = new wxButton(this, -1, _("Download Codes (WiiRD Database)"), wxDefaultPosition, wxSize(128, -1));
+ btn_download = new wxButton(this, -1, _("Download Codes (WiiRD Database)"), wxDefaultPosition, wxSize(128, -1));
+ btn_download->Enable(false);
btn_download->Bind(wxEVT_COMMAND_BUTTON_CLICKED, &CodeConfigPanel::DownloadCodes, this);
sizer_buttons->AddStretchSpacer(1);
sizer_buttons->Add(btn_download, 1, wxEXPAND);
@@ -60,6 +61,9 @@ CodeConfigPanel::CodeConfigPanel(wxWindow* const parent)
void CodeConfigPanel::UpdateCodeList()
{
+ // disable the button if it doesn't have an effect
+ btn_download->Enable(!m_gameid.empty());
+
m_listbox_gcodes->Clear();
// add the codes to the listbox
std::vector<GeckoCode>::const_iterator
diff --git a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h
index 8a59e09ce2..66bbdbd4bb 100644
--- a/Source/Core/DolphinWX/Src/GeckoCodeDiag.h
+++ b/Source/Core/DolphinWX/Src/GeckoCodeDiag.h
@@ -44,7 +44,7 @@ private:
wxTextCtrl *textctrl_notes;
wxListBox *listbox_codes;
} m_infobox;
-
+ wxButton* btn_download;
};