diff options
| author | Mat M <mathew1800@gmail.com> | 2016-11-05 08:19:28 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-05 08:19:28 -0400 |
| commit | 0ad4e70fc50381ccd9875fe9d5c80be1f24342a5 (patch) | |
| tree | c9dd030b8d0361ee2552d177e9475e68c611a606 /Source/Core/DolphinWX/Config/GeneralConfigPane.cpp | |
| parent | d88295d5a11e9b320d053529565e679cb9c1725b (diff) | |
| parent | 9543b9d20d3a4557ff6112e38e28cd2cdac16ac1 (diff) | |
Merge pull request #4422 from lioncash/codewindow-menu
CodeWindow: Migrate more menubar handling code to CFrame
Diffstat (limited to 'Source/Core/DolphinWX/Config/GeneralConfigPane.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Config/GeneralConfigPane.cpp | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/Source/Core/DolphinWX/Config/GeneralConfigPane.cpp b/Source/Core/DolphinWX/Config/GeneralConfigPane.cpp index 78501ba14a..86cbe7e84b 100644 --- a/Source/Core/DolphinWX/Config/GeneralConfigPane.cpp +++ b/Source/Core/DolphinWX/Config/GeneralConfigPane.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "DolphinWX/Config/GeneralConfigPane.h" + #include <wx/button.h> #include <wx/checkbox.h> #include <wx/choice.h> @@ -16,14 +18,10 @@ #include "Core/ConfigManager.h" #include "Core/Core.h" #include "Core/PowerPC/PowerPC.h" -#include "DolphinWX/Config/GeneralConfigPane.h" -#include "DolphinWX/Debugger/CodeWindow.h" -#include "DolphinWX/Frame.h" -#include "DolphinWX/Main.h" GeneralConfigPane::GeneralConfigPane(wxWindow* parent, wxWindowID id) : wxPanel(parent, id) { - cpu_cores = { + m_cpu_cores = { {PowerPC::CORE_INTERPRETER, _("Interpreter (slowest)")}, {PowerPC::CORE_CACHEDINTERPRETER, _("Cached Interpreter (slower)")}, #ifdef _M_X86_64 @@ -50,7 +48,7 @@ void GeneralConfigPane::InitializeGUI() m_throttler_array_string.Add(wxString::Format(_("%i%%"), i)); } - for (const CPUCore& cpu_core : cpu_cores) + for (const CPUCore& cpu_core : m_cpu_cores) m_cpu_engine_array_string.Add(cpu_core.name); m_dual_core_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Dual Core (speedup)")); @@ -156,9 +154,9 @@ void GeneralConfigPane::LoadGUIValues() if (selection < m_throttler_array_string.size()) m_throttler_choice->SetSelection(selection); - for (size_t i = 0; i < cpu_cores.size(); ++i) + for (size_t i = 0; i < m_cpu_cores.size(); ++i) { - if (cpu_cores[i].CPUid == startup_params.iCPUCore) + if (m_cpu_cores[i].CPUid == startup_params.iCPUCore) m_cpu_engine_radiobox->SetSelection(i); } } @@ -200,15 +198,7 @@ void GeneralConfigPane::OnThrottlerChoiceChanged(wxCommandEvent& event) void GeneralConfigPane::OnCPUEngineRadioBoxChanged(wxCommandEvent& event) { - const int selection = m_cpu_engine_radiobox->GetSelection(); - - if (main_frame->g_pCodeWindow) - { - bool using_interp = (SConfig::GetInstance().iCPUCore == PowerPC::CORE_INTERPRETER); - main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, using_interp); - } - - SConfig::GetInstance().iCPUCore = cpu_cores[selection].CPUid; + SConfig::GetInstance().iCPUCore = m_cpu_cores.at(event.GetSelection()).CPUid; } void GeneralConfigPane::OnAnalyticsCheckBoxChanged(wxCommandEvent& event) |
