Merge pull request #2234 from lioncash/config
DolphinWX: Break up ConfigMain into separate classes.
This commit is contained in:
commit
74f25ad8ec
|
@ -1,12 +1,19 @@
|
|||
set(GUI_SRCS
|
||||
ARCodeAddEdit.cpp
|
||||
AboutDolphin.cpp
|
||||
ConfigMain.cpp
|
||||
ControllerConfigDiag.cpp
|
||||
Cheats/CheatSearchTab.cpp
|
||||
Cheats/CheatsWindow.cpp
|
||||
Cheats/CreateCodeDialog.cpp
|
||||
Cheats/GeckoCodeDiag.cpp
|
||||
Config/AdvancedConfigPane.cpp
|
||||
Config/AudioConfigPane.cpp
|
||||
Config/ConfigMain.cpp
|
||||
Config/GameCubeConfigPane.cpp
|
||||
Config/GeneralConfigPane.cpp
|
||||
Config/InterfaceConfigPane.cpp
|
||||
Config/PathConfigPane.cpp
|
||||
Config/WiiConfigPane.cpp
|
||||
Debugger/BreakpointDlg.cpp
|
||||
Debugger/BreakpointView.cpp
|
||||
Debugger/BreakpointWindow.cpp
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "DolphinWX/Config/AdvancedConfigPane.h"
|
||||
|
||||
AdvancedConfigPane::AdvancedConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
}
|
||||
|
||||
void AdvancedConfigPane::InitializeGUI()
|
||||
{
|
||||
m_clock_override_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable CPU Clock Override"));
|
||||
m_clock_override_slider = new wxSlider(this, wxID_ANY, 100, 0, 150);
|
||||
m_clock_override_text = new wxStaticText(this, wxID_ANY, "");
|
||||
|
||||
m_clock_override_checkbox->Bind(wxEVT_CHECKBOX, &AdvancedConfigPane::OnClockOverrideCheckBoxChanged, this);
|
||||
m_clock_override_slider->Bind(wxEVT_SLIDER, &AdvancedConfigPane::OnClockOverrideSliderChanged, this);
|
||||
|
||||
wxStaticText* const clock_override_description = new wxStaticText(this, wxID_ANY,
|
||||
_("Higher values can make variable-framerate games\n"
|
||||
"run at a higher framerate, at the expense of CPU.\n"
|
||||
"Lower values can make variable-framerate games\n"
|
||||
"run at a lower framerate, saving CPU.\n\n"
|
||||
"WARNING: Changing this from the default (100%)\n"
|
||||
"can and will break games and cause glitches.\n"
|
||||
"Do so at your own risk. Please do not report\n"
|
||||
"bugs that occur with a non-default clock.\n"));
|
||||
|
||||
wxBoxSizer* const clock_override_checkbox_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
clock_override_checkbox_sizer->Add(m_clock_override_checkbox);
|
||||
|
||||
wxBoxSizer* const clock_override_slider_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
clock_override_slider_sizer->Add(m_clock_override_slider, 1, wxALL, 5);
|
||||
clock_override_slider_sizer->Add(m_clock_override_text, 1, wxALL, 5);
|
||||
|
||||
wxBoxSizer* const clock_override_description_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
clock_override_description_sizer->Add(clock_override_description, 1, wxALL, 5);
|
||||
|
||||
wxStaticBoxSizer* const cpu_options_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("CPU Options"));
|
||||
cpu_options_sizer->Add(clock_override_checkbox_sizer);
|
||||
cpu_options_sizer->Add(clock_override_slider_sizer);
|
||||
cpu_options_sizer->Add(clock_override_description_sizer);
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(cpu_options_sizer , 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
}
|
||||
|
||||
void AdvancedConfigPane::LoadGUIValues()
|
||||
{
|
||||
int ocFactor = (int)(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f + 0.5f);
|
||||
m_clock_override_checkbox->SetValue(SConfig::GetInstance().m_OCEnable);
|
||||
m_clock_override_slider ->SetValue(ocFactor);
|
||||
UpdateCPUClock();
|
||||
}
|
||||
|
||||
void AdvancedConfigPane::OnClockOverrideCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_OCEnable = m_clock_override_checkbox->IsChecked();
|
||||
m_clock_override_slider->Enable(SConfig::GetInstance().m_OCEnable);
|
||||
UpdateCPUClock();
|
||||
}
|
||||
|
||||
void AdvancedConfigPane::OnClockOverrideSliderChanged(wxCommandEvent& event)
|
||||
{
|
||||
// Vaguely exponential scaling?
|
||||
SConfig::GetInstance().m_OCFactor = std::exp2f((m_clock_override_slider->GetValue() - 100.f) / 25.f);
|
||||
UpdateCPUClock();
|
||||
}
|
||||
|
||||
void AdvancedConfigPane::UpdateCPUClock()
|
||||
{
|
||||
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||
int percent = (int)(std::roundf(SConfig::GetInstance().m_OCFactor * 100.f));
|
||||
int clock = (int)(std::roundf(SConfig::GetInstance().m_OCFactor * (wii ? 729.f : 486.f)));
|
||||
|
||||
m_clock_override_text->SetLabel(SConfig::GetInstance().m_OCEnable ? wxString::Format("%d %% (%d mhz)", percent, clock) : "");
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxCheckBox;
|
||||
class wxCommandEvent;
|
||||
class wxSlider;
|
||||
class wxStaticText;
|
||||
|
||||
class AdvancedConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
AdvancedConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
|
||||
void OnClockOverrideCheckBoxChanged(wxCommandEvent&);
|
||||
void OnClockOverrideSliderChanged(wxCommandEvent&);
|
||||
|
||||
void UpdateCPUClock();
|
||||
|
||||
wxCheckBox* m_clock_override_checkbox;
|
||||
wxSlider* m_clock_override_slider;
|
||||
wxStaticText* m_clock_override_text;
|
||||
};
|
|
@ -0,0 +1,178 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/slider.h>
|
||||
#include <wx/spinctrl.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "AudioCommon/AudioCommon.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/AudioConfigPane.h"
|
||||
|
||||
AudioConfigPane::AudioConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
RefreshGUI();
|
||||
}
|
||||
|
||||
void AudioConfigPane::InitializeGUI()
|
||||
{
|
||||
m_dsp_engine_strings.Add(_("DSP HLE emulation (fast)"));
|
||||
m_dsp_engine_strings.Add(_("DSP LLE recompiler"));
|
||||
m_dsp_engine_strings.Add(_("DSP LLE interpreter (slow)"));
|
||||
|
||||
m_dsp_engine_radiobox = new wxRadioBox(this, wxID_ANY, _("DSP Emulator Engine"), wxDefaultPosition, wxDefaultSize, m_dsp_engine_strings, 0, wxRA_SPECIFY_ROWS);
|
||||
m_dpl2_decoder_checkbox = new wxCheckBox(this, wxID_ANY, _("Dolby Pro Logic II decoder"));
|
||||
m_volume_slider = new wxSlider(this, wxID_ANY, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_VERTICAL | wxSL_INVERSE);
|
||||
m_volume_text = new wxStaticText(this, wxID_ANY, "");
|
||||
m_audio_backend_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_audio_backend_strings);
|
||||
m_audio_latency_spinctrl = new wxSpinCtrl(this, wxID_ANY, "", wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 0, 30);
|
||||
|
||||
m_dsp_engine_radiobox->Bind(wxEVT_RADIOBOX, &AudioConfigPane::OnDSPEngineRadioBoxChanged, this);
|
||||
m_dpl2_decoder_checkbox->Bind(wxEVT_CHECKBOX, &AudioConfigPane::OnDPL2DecoderCheckBoxChanged, this);
|
||||
m_volume_slider->Bind(wxEVT_SLIDER, &AudioConfigPane::OnVolumeSliderChanged, this);
|
||||
m_audio_backend_choice->Bind(wxEVT_CHOICE, &AudioConfigPane::OnAudioBackendChanged, this);
|
||||
m_audio_latency_spinctrl->Bind(wxEVT_SPINCTRL, &AudioConfigPane::OnLatencySpinCtrlChanged, this);
|
||||
|
||||
m_audio_backend_choice->SetToolTip(_("Changing this will have no effect while the emulator is running."));
|
||||
m_audio_latency_spinctrl->SetToolTip(_("Sets the latency (in ms). Higher values may reduce audio crackling. OpenAL backend only."));
|
||||
#if defined(__APPLE__)
|
||||
m_dpl2_decoder_checkbox->SetToolTip(_("Enables Dolby Pro Logic II emulation using 5.1 surround. Not available on OS X."));
|
||||
#else
|
||||
m_dpl2_decoder_checkbox->SetToolTip(_("Enables Dolby Pro Logic II emulation using 5.1 surround. OpenAL or Pulse backends only."));
|
||||
#endif
|
||||
|
||||
wxStaticBoxSizer* const dsp_engine_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Sound Settings"));
|
||||
dsp_engine_sizer->Add(m_dsp_engine_radiobox, 0, wxALL | wxEXPAND, 5);
|
||||
dsp_engine_sizer->Add(m_dpl2_decoder_checkbox, 0, wxALL, 5);
|
||||
|
||||
wxStaticBoxSizer* const volume_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Volume"));
|
||||
volume_sizer->Add(m_volume_slider, 1, wxLEFT | wxRIGHT, 13);
|
||||
volume_sizer->Add(m_volume_text, 0, wxALIGN_CENTER | wxALL, 5);
|
||||
|
||||
wxGridBagSizer* const backend_grid_sizer = new wxGridBagSizer();
|
||||
backend_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("Audio Backend:")), wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
backend_grid_sizer->Add(m_audio_backend_choice, wxGBPosition(0, 1), wxDefaultSpan, wxALL, 5);
|
||||
backend_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("Latency:")), wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
backend_grid_sizer->Add(m_audio_latency_spinctrl, wxGBPosition(1, 1), wxDefaultSpan, wxALL, 5);
|
||||
|
||||
wxStaticBoxSizer* const backend_static_box_sizer = new wxStaticBoxSizer(wxHORIZONTAL, this, _("Backend Settings"));
|
||||
backend_static_box_sizer->Add(backend_grid_sizer, 0, wxEXPAND);
|
||||
|
||||
wxBoxSizer* const dsp_audio_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
dsp_audio_sizer->Add(dsp_engine_sizer, 1, wxEXPAND | wxALL, 5);
|
||||
dsp_audio_sizer->Add(volume_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(dsp_audio_sizer, 0, wxALL | wxEXPAND);
|
||||
main_sizer->Add(backend_static_box_sizer, 0, wxALL | wxEXPAND, 5);
|
||||
|
||||
SetSizerAndFit(main_sizer);
|
||||
}
|
||||
|
||||
void AudioConfigPane::LoadGUIValues()
|
||||
{
|
||||
PopulateBackendChoiceBox();
|
||||
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
// Audio DSP Engine
|
||||
if (startup_params.bDSPHLE)
|
||||
m_dsp_engine_radiobox->SetSelection(0);
|
||||
else
|
||||
m_dsp_engine_radiobox->SetSelection(SConfig::GetInstance().m_DSPEnableJIT ? 1 : 2);
|
||||
|
||||
m_volume_slider->Enable(SupportsVolumeChanges(SConfig::GetInstance().sBackend));
|
||||
m_volume_slider->SetValue(SConfig::GetInstance().m_Volume);
|
||||
|
||||
m_volume_text->SetLabel(wxString::Format("%d %%", SConfig::GetInstance().m_Volume));
|
||||
|
||||
m_dpl2_decoder_checkbox->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL
|
||||
|| std::string(SConfig::GetInstance().sBackend) == BACKEND_PULSEAUDIO);
|
||||
m_dpl2_decoder_checkbox->SetValue(startup_params.bDPL2Decoder);
|
||||
|
||||
m_audio_latency_spinctrl->Enable(std::string(SConfig::GetInstance().sBackend) == BACKEND_OPENAL);
|
||||
m_audio_latency_spinctrl->SetValue(startup_params.iLatency);
|
||||
}
|
||||
|
||||
void AudioConfigPane::RefreshGUI()
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
m_audio_latency_spinctrl->Disable();
|
||||
m_audio_backend_choice->Disable();
|
||||
m_dpl2_decoder_checkbox->Disable();
|
||||
m_dsp_engine_radiobox->Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnDSPEngineRadioBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = m_dsp_engine_radiobox->GetSelection() == 0;
|
||||
SConfig::GetInstance().m_DSPEnableJIT = m_dsp_engine_radiobox->GetSelection() == 1;
|
||||
AudioCommon::UpdateSoundStream();
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnDPL2DecoderCheckBoxChanged(wxCommandEvent&)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDPL2Decoder = m_dpl2_decoder_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnVolumeSliderChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_Volume = m_volume_slider->GetValue();
|
||||
AudioCommon::UpdateSoundStream();
|
||||
m_volume_text->SetLabel(wxString::Format("%d %%", m_volume_slider->GetValue()));
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnAudioBackendChanged(wxCommandEvent& event)
|
||||
{
|
||||
m_volume_slider->Enable(SupportsVolumeChanges(WxStrToStr(m_audio_backend_choice->GetStringSelection())));
|
||||
m_audio_latency_spinctrl->Enable(WxStrToStr(m_audio_backend_choice->GetStringSelection()) == BACKEND_OPENAL);
|
||||
m_dpl2_decoder_checkbox->Enable(WxStrToStr(m_audio_backend_choice->GetStringSelection()) == BACKEND_OPENAL ||
|
||||
WxStrToStr(m_audio_backend_choice->GetStringSelection()) == BACKEND_PULSEAUDIO);
|
||||
|
||||
// Don't save the translated BACKEND_NULLSOUND string
|
||||
SConfig::GetInstance().sBackend = m_audio_backend_choice->GetSelection() ?
|
||||
WxStrToStr(m_audio_backend_choice->GetStringSelection()) : BACKEND_NULLSOUND;
|
||||
|
||||
AudioCommon::UpdateSoundStream();
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnLatencySpinCtrlChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iLatency = m_audio_latency_spinctrl->GetValue();
|
||||
}
|
||||
|
||||
void AudioConfigPane::PopulateBackendChoiceBox()
|
||||
{
|
||||
for (const std::string& backend : AudioCommon::GetSoundBackends())
|
||||
{
|
||||
m_audio_backend_choice->Append(wxGetTranslation(StrToWxStr(backend)));
|
||||
|
||||
int num = m_audio_backend_choice->FindString(StrToWxStr(SConfig::GetInstance().sBackend));
|
||||
m_audio_backend_choice->SetSelection(num);
|
||||
}
|
||||
}
|
||||
|
||||
bool AudioConfigPane::SupportsVolumeChanges(const std::string& backend)
|
||||
{
|
||||
//FIXME: this one should ask the backend whether it supports it.
|
||||
// but getting the backend from string etc. is probably
|
||||
// too much just to enable/disable a stupid slider...
|
||||
return (backend == BACKEND_COREAUDIO ||
|
||||
backend == BACKEND_OPENAL ||
|
||||
backend == BACKEND_XAUDIO2);
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
class wxCommandEvent;
|
||||
class wxRadioBox;
|
||||
class wxSlider;
|
||||
class wxSpinCtrl;
|
||||
class wxStaticText;
|
||||
|
||||
class AudioConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
AudioConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void RefreshGUI();
|
||||
|
||||
void PopulateBackendChoiceBox();
|
||||
static bool SupportsVolumeChanges(const std::string&);
|
||||
|
||||
void OnDSPEngineRadioBoxChanged(wxCommandEvent&);
|
||||
void OnDPL2DecoderCheckBoxChanged(wxCommandEvent&);
|
||||
void OnVolumeSliderChanged(wxCommandEvent&);
|
||||
void OnAudioBackendChanged(wxCommandEvent&);
|
||||
void OnLatencySpinCtrlChanged(wxCommandEvent&);
|
||||
|
||||
wxArrayString m_dsp_engine_strings;
|
||||
wxArrayString m_audio_backend_strings;
|
||||
|
||||
wxRadioBox* m_dsp_engine_radiobox;
|
||||
wxCheckBox* m_dpl2_decoder_checkbox;
|
||||
wxSlider* m_volume_slider;
|
||||
wxStaticText* m_volume_text;
|
||||
wxChoice* m_audio_backend_choice;
|
||||
wxSpinCtrl* m_audio_latency_spinctrl;
|
||||
};
|
|
@ -0,0 +1,101 @@
|
|||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <wx/notebook.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/AdvancedConfigPane.h"
|
||||
#include "DolphinWX/Config/AudioConfigPane.h"
|
||||
#include "DolphinWX/Config/ConfigMain.h"
|
||||
#include "DolphinWX/Config/GameCubeConfigPane.h"
|
||||
#include "DolphinWX/Config/GeneralConfigPane.h"
|
||||
#include "DolphinWX/Config/InterfaceConfigPane.h"
|
||||
#include "DolphinWX/Config/PathConfigPane.h"
|
||||
#include "DolphinWX/Config/WiiConfigPane.h"
|
||||
|
||||
// Sent by child panes to signify that the game list should
|
||||
// be updated when this modal dialog closes.
|
||||
wxDEFINE_EVENT(wxDOLPHIN_CFG_REFRESH_LIST, wxCommandEvent);
|
||||
|
||||
CConfigMain::CConfigMain(wxWindow* parent, wxWindowID id, const wxString& title,
|
||||
const wxPoint& position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
// Control refreshing of the ISOs list
|
||||
m_refresh_game_list_on_close = false;
|
||||
|
||||
Bind(wxEVT_CLOSE_WINDOW, &CConfigMain::OnClose, this);
|
||||
Bind(wxEVT_BUTTON, &CConfigMain::OnOk, this, wxID_OK);
|
||||
Bind(wxDOLPHIN_CFG_REFRESH_LIST, &CConfigMain::OnSetRefreshGameListOnClose, this);
|
||||
|
||||
CreateGUIControls();
|
||||
}
|
||||
|
||||
CConfigMain::~CConfigMain()
|
||||
{
|
||||
}
|
||||
|
||||
void CConfigMain::SetSelectedTab(int tab)
|
||||
{
|
||||
// TODO : this is just a quick and dirty way to do it, possible cleanup
|
||||
|
||||
switch (tab)
|
||||
{
|
||||
case ID_AUDIOPAGE:
|
||||
Notebook->SetSelection(2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void CConfigMain::CreateGUIControls()
|
||||
{
|
||||
// Create the notebook and pages
|
||||
Notebook = new wxNotebook(this, ID_NOTEBOOK);
|
||||
wxPanel* const general_pane = new GeneralConfigPane(Notebook, ID_GENERALPAGE);
|
||||
wxPanel* const interface_pane = new InterfaceConfigPane(Notebook, ID_DISPLAYPAGE);
|
||||
wxPanel* const audio_pane = new AudioConfigPane(Notebook, ID_AUDIOPAGE);
|
||||
wxPanel* const gamecube_pane = new GameCubeConfigPane(Notebook, ID_GAMECUBEPAGE);
|
||||
wxPanel* const wii_pane = new WiiConfigPane(Notebook, ID_WIIPAGE);
|
||||
wxPanel* const path_pane = new PathConfigPane(Notebook, ID_PATHSPAGE);
|
||||
wxPanel* const advanced_pane = new AdvancedConfigPane(Notebook, ID_ADVANCEDPAGE);
|
||||
|
||||
Notebook->AddPage(general_pane, _("General"));
|
||||
Notebook->AddPage(interface_pane, _("Interface"));
|
||||
Notebook->AddPage(audio_pane, _("Audio"));
|
||||
Notebook->AddPage(gamecube_pane, _("GameCube"));
|
||||
Notebook->AddPage(wii_pane, _("Wii"));
|
||||
Notebook->AddPage(path_pane, _("Paths"));
|
||||
Notebook->AddPage(advanced_pane, _("Advanced"));
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(Notebook, 1, wxEXPAND | wxALL, 5);
|
||||
main_sizer->Add(CreateButtonSizer(wxOK), 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
|
||||
SetSizerAndFit(main_sizer);
|
||||
Center();
|
||||
SetFocus();
|
||||
}
|
||||
|
||||
void CConfigMain::OnClose(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
EndModal((m_refresh_game_list_on_close) ? wxID_OK : wxID_CANCEL);
|
||||
}
|
||||
|
||||
void CConfigMain::OnOk(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
Close();
|
||||
|
||||
// Save the config. Dolphin crashes too often to only save the settings on closing
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
|
||||
void CConfigMain::OnSetRefreshGameListOnClose(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
m_refresh_game_list_on_close = true;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/dialog.h>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class wxNotebook;
|
||||
class wxPanel;
|
||||
class wxWindow;
|
||||
|
||||
wxDECLARE_EVENT(wxDOLPHIN_CFG_REFRESH_LIST, wxCommandEvent);
|
||||
|
||||
class CConfigMain : public wxDialog
|
||||
{
|
||||
public:
|
||||
CConfigMain(wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& title = _("Dolphin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
virtual ~CConfigMain();
|
||||
|
||||
void SetSelectedTab(int tab);
|
||||
|
||||
enum
|
||||
{
|
||||
ID_NOTEBOOK = 1000,
|
||||
ID_GENERALPAGE,
|
||||
ID_DISPLAYPAGE,
|
||||
ID_AUDIOPAGE,
|
||||
ID_GAMECUBEPAGE,
|
||||
ID_WIIPAGE,
|
||||
ID_PATHSPAGE,
|
||||
ID_ADVANCEDPAGE,
|
||||
};
|
||||
|
||||
private:
|
||||
void CreateGUIControls();
|
||||
void OnClose(wxCloseEvent& event);
|
||||
void OnOk(wxCommandEvent& event);
|
||||
void OnSetRefreshGameListOnClose(wxCommandEvent& event);
|
||||
|
||||
wxNotebook* Notebook;
|
||||
|
||||
bool m_refresh_game_list_on_close;
|
||||
};
|
|
@ -0,0 +1,367 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/filedlg.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/HW/EXI.h"
|
||||
#include "Core/HW/GCMemcard.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/ConfigMain.h"
|
||||
#include "DolphinWX/Config/GameCubeConfigPane.h"
|
||||
|
||||
#define DEV_NONE_STR _trans("<Nothing>")
|
||||
#define DEV_DUMMY_STR _trans("Dummy")
|
||||
|
||||
#define EXIDEV_MEMCARD_STR _trans("Memory Card")
|
||||
#define EXIDEV_MEMDIR_STR _trans("GCI Folder")
|
||||
#define EXIDEV_MIC_STR _trans("Mic")
|
||||
#define EXIDEV_BBA_STR "BBA"
|
||||
#define EXIDEV_AGP_STR "Advance Game Port"
|
||||
#define EXIDEV_AM_BB_STR _trans("AM-Baseboard")
|
||||
#define EXIDEV_GECKO_STR "USBGecko"
|
||||
|
||||
GameCubeConfigPane::GameCubeConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
RefreshGUI();
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::InitializeGUI()
|
||||
{
|
||||
m_ipl_language_strings.Add(_("English"));
|
||||
m_ipl_language_strings.Add(_("German"));
|
||||
m_ipl_language_strings.Add(_("French"));
|
||||
m_ipl_language_strings.Add(_("Spanish"));
|
||||
m_ipl_language_strings.Add(_("Italian"));
|
||||
m_ipl_language_strings.Add(_("Dutch"));
|
||||
|
||||
m_system_lang_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ipl_language_strings);
|
||||
m_system_lang_choice->SetToolTip(_("Sets the GameCube system language."));
|
||||
m_system_lang_choice->Bind(wxEVT_CHOICE, &GameCubeConfigPane::OnSystemLanguageChange, this);
|
||||
|
||||
m_skip_bios_checkbox = new wxCheckBox(this, wxID_ANY, _("Skip BIOS"));
|
||||
m_skip_bios_checkbox->Bind(wxEVT_CHECKBOX, &GameCubeConfigPane::OnSkipBiosCheckBoxChanged, this);
|
||||
|
||||
if (!File::Exists(File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + USA_DIR + DIR_SEP GC_IPL) &&
|
||||
!File::Exists(File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + USA_DIR + DIR_SEP GC_IPL) &&
|
||||
!File::Exists(File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + JAP_DIR + DIR_SEP GC_IPL) &&
|
||||
!File::Exists(File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + JAP_DIR + DIR_SEP GC_IPL) &&
|
||||
!File::Exists(File::GetUserPath(D_GCUSER_IDX) + DIR_SEP + EUR_DIR + DIR_SEP GC_IPL) &&
|
||||
!File::Exists(File::GetSysDirectory() + GC_SYS_DIR + DIR_SEP + EUR_DIR + DIR_SEP GC_IPL))
|
||||
{
|
||||
m_skip_bios_checkbox->Disable();
|
||||
m_skip_bios_checkbox->SetToolTip(_("Put BIOS roms in User/GC/{region}."));
|
||||
}
|
||||
|
||||
// Device settings
|
||||
// EXI Devices
|
||||
wxStaticText* GCEXIDeviceText[3] = {
|
||||
new wxStaticText(this, wxID_ANY, _("Slot A")),
|
||||
new wxStaticText(this, wxID_ANY, _("Slot B")),
|
||||
new wxStaticText(this, wxID_ANY, "SP1"),
|
||||
};
|
||||
|
||||
m_exi_devices[0] = new wxChoice(this, wxID_ANY);
|
||||
m_exi_devices[0]->Bind(wxEVT_CHOICE, &GameCubeConfigPane::OnSlotAChanged, this);
|
||||
m_exi_devices[1] = new wxChoice(this, wxID_ANY);
|
||||
m_exi_devices[1]->Bind(wxEVT_CHOICE, &GameCubeConfigPane::OnSlotBChanged, this);
|
||||
m_exi_devices[2] = new wxChoice(this, wxID_ANY);
|
||||
m_exi_devices[2]->Bind(wxEVT_CHOICE, &GameCubeConfigPane::OnSP1Changed, this);
|
||||
m_exi_devices[2]->SetToolTip(_("Serial Port 1 - This is the port which devices such as the net adapter use."));
|
||||
|
||||
m_memcard_path[0] = new wxButton(this, wxID_ANY, "...", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
m_memcard_path[0]->Bind(wxEVT_BUTTON, &GameCubeConfigPane::OnSlotAButtonClick, this);
|
||||
m_memcard_path[1] = new wxButton(this, wxID_ANY, "...", wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
m_memcard_path[1]->Bind(wxEVT_BUTTON, &GameCubeConfigPane::OnSlotBButtonClick, this);
|
||||
|
||||
// Populate the GameCube page
|
||||
wxGridBagSizer* const sGamecubeIPLSettings = new wxGridBagSizer();
|
||||
sGamecubeIPLSettings->Add(m_skip_bios_checkbox, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
sGamecubeIPLSettings->Add(new wxStaticText(this, wxID_ANY, _("System Language:")),
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
sGamecubeIPLSettings->Add(m_system_lang_choice, wxGBPosition(1, 1), wxDefaultSpan, wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
|
||||
wxStaticBoxSizer* const sbGamecubeIPLSettings = new wxStaticBoxSizer(wxVERTICAL, this, _("IPL Settings"));
|
||||
sbGamecubeIPLSettings->Add(sGamecubeIPLSettings);
|
||||
wxStaticBoxSizer* const sbGamecubeDeviceSettings = new wxStaticBoxSizer(wxVERTICAL, this, _("Device Settings"));
|
||||
wxGridBagSizer* const sbGamecubeEXIDevSettings = new wxGridBagSizer(10, 10);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
sbGamecubeEXIDevSettings->Add(GCEXIDeviceText[i], wxGBPosition(i, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
|
||||
sbGamecubeEXIDevSettings->Add(m_exi_devices[i], wxGBPosition(i, 1), wxGBSpan(1, (i < 2) ? 1 : 2), wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
if (i < 2)
|
||||
sbGamecubeEXIDevSettings->Add(m_memcard_path[i], wxGBPosition(i, 2), wxDefaultSpan, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
if (NetPlay::IsNetPlayRunning())
|
||||
m_exi_devices[i]->Disable();
|
||||
}
|
||||
sbGamecubeDeviceSettings->Add(sbGamecubeEXIDevSettings, 0, wxALL, 5);
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(sbGamecubeIPLSettings, 0, wxEXPAND | wxALL, 5);
|
||||
main_sizer->Add(sbGamecubeDeviceSettings, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
m_system_lang_choice->SetSelection(startup_params.SelectedLanguage);
|
||||
m_skip_bios_checkbox->SetValue(startup_params.bHLE_BS2);
|
||||
|
||||
wxArrayString slot_devices;
|
||||
slot_devices.Add(_(DEV_NONE_STR));
|
||||
slot_devices.Add(_(DEV_DUMMY_STR));
|
||||
slot_devices.Add(_(EXIDEV_MEMCARD_STR));
|
||||
slot_devices.Add(_(EXIDEV_MEMDIR_STR));
|
||||
slot_devices.Add(_(EXIDEV_GECKO_STR));
|
||||
slot_devices.Add(_(EXIDEV_AGP_STR));
|
||||
|
||||
#if HAVE_PORTAUDIO
|
||||
slot_devices.Add(_(EXIDEV_MIC_STR));
|
||||
#endif
|
||||
|
||||
wxArrayString sp1_devices;
|
||||
sp1_devices.Add(_(DEV_NONE_STR));
|
||||
sp1_devices.Add(_(DEV_DUMMY_STR));
|
||||
sp1_devices.Add(_(EXIDEV_BBA_STR));
|
||||
sp1_devices.Add(_(EXIDEV_AM_BB_STR));
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
bool isMemcard = false;
|
||||
|
||||
// Add strings to the wxChoice list, the third wxChoice is the SP1 slot
|
||||
if (i == 2)
|
||||
m_exi_devices[i]->Append(sp1_devices);
|
||||
else
|
||||
m_exi_devices[i]->Append(slot_devices);
|
||||
|
||||
switch (SConfig::GetInstance().m_EXIDevice[i])
|
||||
{
|
||||
case EXIDEVICE_NONE:
|
||||
m_exi_devices[i]->SetStringSelection(slot_devices[0]);
|
||||
break;
|
||||
case EXIDEVICE_MEMORYCARD:
|
||||
isMemcard = m_exi_devices[i]->SetStringSelection(slot_devices[2]);
|
||||
break;
|
||||
case EXIDEVICE_MEMORYCARDFOLDER:
|
||||
m_exi_devices[i]->SetStringSelection(slot_devices[3]);
|
||||
break;
|
||||
case EXIDEVICE_GECKO:
|
||||
m_exi_devices[i]->SetStringSelection(slot_devices[4]);
|
||||
break;
|
||||
case EXIDEVICE_AGP:
|
||||
isMemcard = m_exi_devices[i]->SetStringSelection(slot_devices[5]);
|
||||
break;
|
||||
case EXIDEVICE_MIC:
|
||||
m_exi_devices[i]->SetStringSelection(slot_devices[6]);
|
||||
break;
|
||||
case EXIDEVICE_ETH:
|
||||
m_exi_devices[i]->SetStringSelection(sp1_devices[2]);
|
||||
break;
|
||||
case EXIDEVICE_AM_BASEBOARD:
|
||||
m_exi_devices[i]->SetStringSelection(sp1_devices[3]);
|
||||
break;
|
||||
case EXIDEVICE_DUMMY:
|
||||
default:
|
||||
m_exi_devices[i]->SetStringSelection(slot_devices[1]);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!isMemcard && i < 2)
|
||||
m_memcard_path[i]->Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::RefreshGUI()
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
m_system_lang_choice->Disable();
|
||||
m_skip_bios_checkbox->Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSystemLanguageChange(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage = m_system_lang_choice->GetSelection();
|
||||
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSkipBiosCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2 = m_skip_bios_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSlotAChanged(wxCommandEvent& event)
|
||||
{
|
||||
ChooseEXIDevice(event.GetString(), 0);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSlotBChanged(wxCommandEvent& event)
|
||||
{
|
||||
ChooseEXIDevice(event.GetString(), 1);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSP1Changed(wxCommandEvent& event)
|
||||
{
|
||||
ChooseEXIDevice(event.GetString(), 2);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSlotAButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
ChooseSlotPath(true, SConfig::GetInstance().m_EXIDevice[0]);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSlotBButtonClick(wxCommandEvent& event)
|
||||
{
|
||||
ChooseSlotPath(false, SConfig::GetInstance().m_EXIDevice[1]);
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::ChooseEXIDevice(const wxString& deviceName, int deviceNum)
|
||||
{
|
||||
TEXIDevices tempType;
|
||||
|
||||
if (!deviceName.compare(_(EXIDEV_MEMCARD_STR)))
|
||||
tempType = EXIDEVICE_MEMORYCARD;
|
||||
else if (!deviceName.compare(_(EXIDEV_MEMDIR_STR)))
|
||||
tempType = EXIDEVICE_MEMORYCARDFOLDER;
|
||||
else if (!deviceName.compare(_(EXIDEV_MIC_STR)))
|
||||
tempType = EXIDEVICE_MIC;
|
||||
else if (!deviceName.compare(EXIDEV_BBA_STR))
|
||||
tempType = EXIDEVICE_ETH;
|
||||
else if (!deviceName.compare(EXIDEV_AGP_STR))
|
||||
tempType = EXIDEVICE_AGP;
|
||||
else if (!deviceName.compare(_(EXIDEV_AM_BB_STR)))
|
||||
tempType = EXIDEVICE_AM_BASEBOARD;
|
||||
else if (!deviceName.compare(EXIDEV_GECKO_STR))
|
||||
tempType = EXIDEVICE_GECKO;
|
||||
else if (!deviceName.compare(_(DEV_NONE_STR)))
|
||||
tempType = EXIDEVICE_NONE;
|
||||
else
|
||||
tempType = EXIDEVICE_DUMMY;
|
||||
|
||||
// Gray out the memcard path button if we're not on a memcard or AGP
|
||||
if (tempType == EXIDEVICE_MEMORYCARD || tempType == EXIDEVICE_AGP)
|
||||
m_memcard_path[deviceNum]->Enable();
|
||||
else if (deviceNum == 0 || deviceNum == 1)
|
||||
m_memcard_path[deviceNum]->Disable();
|
||||
|
||||
SConfig::GetInstance().m_EXIDevice[deviceNum] = tempType;
|
||||
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
// Change plugged device! :D
|
||||
ExpansionInterface::ChangeDevice(
|
||||
(deviceNum == 1) ? 1 : 0, // SlotB is on channel 1, slotA and SP1 are on 0
|
||||
tempType, // The device enum to change to
|
||||
(deviceNum == 2) ? 2 : 0); // SP1 is device 2, slots are device 0
|
||||
}
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::ChooseSlotPath(bool is_slot_a, TEXIDevices device_type)
|
||||
{
|
||||
bool memcard = (device_type == EXIDEVICE_MEMORYCARD);
|
||||
std::string path;
|
||||
std::string cardname;
|
||||
std::string ext;
|
||||
std::string pathA = SConfig::GetInstance().m_strMemoryCardA;
|
||||
std::string pathB = SConfig::GetInstance().m_strMemoryCardB;
|
||||
if (!memcard)
|
||||
{
|
||||
pathA = SConfig::GetInstance().m_strGbaCartA;
|
||||
pathB = SConfig::GetInstance().m_strGbaCartB;
|
||||
}
|
||||
SplitPath(is_slot_a ? pathA : pathB, &path, &cardname, &ext);
|
||||
std::string filename = WxStrToStr(wxFileSelector(
|
||||
_("Choose a file to open"),
|
||||
StrToWxStr(path),
|
||||
StrToWxStr(cardname),
|
||||
StrToWxStr(ext),
|
||||
memcard ? _("GameCube Memory Cards (*.raw,*.gcp)") + "|*.raw;*.gcp" : _("Game Boy Advance Carts (*.gba)") + "|*.gba"));
|
||||
|
||||
if (!filename.empty())
|
||||
{
|
||||
if (File::Exists(filename))
|
||||
{
|
||||
if (memcard)
|
||||
{
|
||||
GCMemcard memorycard(filename);
|
||||
if (!memorycard.IsValid())
|
||||
{
|
||||
WxUtils::ShowErrorDialog(wxString::Format(_("Cannot use that file as a memory card.\n%s\n" \
|
||||
"is not a valid GameCube memory card file"), filename.c_str()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#ifdef _WIN32
|
||||
if (!strncmp(File::GetExeDirectory().c_str(), filename.c_str(), File::GetExeDirectory().size()))
|
||||
{
|
||||
// If the Exe Directory Matches the prefix of the filename, we still need to verify
|
||||
// that the next character is a directory separator character, otherwise we may create an invalid path
|
||||
char next_char = filename.at(File::GetExeDirectory().size()) + 1;
|
||||
if (next_char == '/' || next_char == '\\')
|
||||
{
|
||||
filename.erase(0, File::GetExeDirectory().size() + 1);
|
||||
filename = "./" + filename;
|
||||
}
|
||||
}
|
||||
std::replace(filename.begin(), filename.end(), '\\', '/');
|
||||
#endif
|
||||
|
||||
// also check that the path isn't used for the other memcard...
|
||||
if (filename.compare(is_slot_a ? pathB : pathA) != 0)
|
||||
{
|
||||
if (memcard)
|
||||
{
|
||||
if (is_slot_a)
|
||||
SConfig::GetInstance().m_strMemoryCardA = filename;
|
||||
else
|
||||
SConfig::GetInstance().m_strMemoryCardB = filename;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_slot_a)
|
||||
SConfig::GetInstance().m_strGbaCartA = filename;
|
||||
else
|
||||
SConfig::GetInstance().m_strGbaCartB = filename;
|
||||
}
|
||||
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
// Change memcard to the new file
|
||||
ExpansionInterface::ChangeDevice(
|
||||
is_slot_a ? 0 : 1, // SlotA: channel 0, SlotB channel 1
|
||||
device_type,
|
||||
0); // SP1 is device 2, slots are device 0
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
WxUtils::ShowErrorDialog(_("Are you trying to use the same file in both slots?"));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxButton;
|
||||
class wxCommandEvent;
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
class wxString;
|
||||
|
||||
class GameCubeConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
GameCubeConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void RefreshGUI();
|
||||
|
||||
void OnSystemLanguageChange(wxCommandEvent&);
|
||||
void OnSkipBiosCheckBoxChanged(wxCommandEvent&);
|
||||
void OnSlotAChanged(wxCommandEvent&);
|
||||
void OnSlotBChanged(wxCommandEvent&);
|
||||
void OnSP1Changed(wxCommandEvent&);
|
||||
void OnSlotAButtonClick(wxCommandEvent&);
|
||||
void OnSlotBButtonClick(wxCommandEvent&);
|
||||
|
||||
void ChooseEXIDevice(const wxString& device_name, int device_id);
|
||||
void ChooseSlotPath(bool is_slot_a, TEXIDevices device_type);
|
||||
|
||||
wxArrayString m_ipl_language_strings;
|
||||
|
||||
wxChoice* m_system_lang_choice;
|
||||
wxCheckBox* m_skip_bios_checkbox;
|
||||
wxChoice* m_exi_devices[3];
|
||||
wxButton* m_memcard_path[2];
|
||||
};
|
|
@ -0,0 +1,167 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/menu.h>
|
||||
#include <wx/radiobox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/PowerPC/PowerPC.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
#include "DolphinWX/Main.h"
|
||||
#include "DolphinWX/Config/GeneralConfigPane.h"
|
||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||
|
||||
|
||||
struct CPUCore
|
||||
{
|
||||
int CPUid;
|
||||
wxString name;
|
||||
};
|
||||
static const CPUCore cpu_cores[] = {
|
||||
{ 0, _("Interpreter (VERY slow)") },
|
||||
#ifdef _M_X86_64
|
||||
{ 1, _("JIT Recompiler (recommended)") },
|
||||
{ 2, _("JITIL Recompiler (slower, experimental)") },
|
||||
#elif defined(_M_ARM_32)
|
||||
{ 3, _("Arm JIT (experimental)") },
|
||||
#elif defined(_M_ARM_64)
|
||||
{ 4, _("Arm64 JIT (experimental)") },
|
||||
#endif
|
||||
};
|
||||
|
||||
GeneralConfigPane::GeneralConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
RefreshGUI();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::InitializeGUI()
|
||||
{
|
||||
m_frame_limit_array_string.Add(_("Off"));
|
||||
m_frame_limit_array_string.Add(_("Auto"));
|
||||
for (int i = 5; i <= 120; i += 5) // from 5 to 120
|
||||
m_frame_limit_array_string.Add(wxString::Format("%i", i));
|
||||
|
||||
for (const CPUCore& cpu_core : cpu_cores)
|
||||
m_cpu_engine_array_string.Add(cpu_core.name);
|
||||
|
||||
m_dual_core_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Dual Core (speedup)"));
|
||||
m_idle_skip_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Idle Skipping (speedup)"));
|
||||
m_cheats_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Cheats"));
|
||||
m_force_ntscj_checkbox = new wxCheckBox(this, wxID_ANY, _("Force Console as NTSC-J"));
|
||||
m_frame_limit_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_frame_limit_array_string);
|
||||
m_cpu_engine_radiobox = new wxRadioBox(this, wxID_ANY, _("CPU Emulator Engine"), wxDefaultPosition, wxDefaultSize, m_cpu_engine_array_string, 0, wxRA_SPECIFY_ROWS);
|
||||
|
||||
m_dual_core_checkbox->SetToolTip(_("Splits the CPU and GPU threads so they can be run on separate cores.\nProvides major speed improvements on most modern PCs, but can cause occasional crashes/glitches."));
|
||||
m_idle_skip_checkbox->SetToolTip(_("Attempt to detect and skip wait-loops.\nIf unsure, leave this checked."));
|
||||
m_cheats_checkbox->SetToolTip(_("Enables the use of Action Replay and Gecko cheats."));
|
||||
m_force_ntscj_checkbox->SetToolTip(_("Forces NTSC-J mode for using the Japanese ROM font.\nIf left unchecked, Dolphin defaults to NTSC-U and automatically enables this setting when playing Japanese games."));
|
||||
m_frame_limit_choice->SetToolTip(_("Limits the game speed to the specified number of frames per second (full speed is 60 for NTSC and 50 for PAL)."));
|
||||
|
||||
m_dual_core_checkbox->Bind(wxEVT_CHECKBOX, &GeneralConfigPane::OnDualCoreCheckBoxChanged, this);
|
||||
m_idle_skip_checkbox->Bind(wxEVT_CHECKBOX, &GeneralConfigPane::OnIdleSkipCheckBoxChanged, this);
|
||||
m_cheats_checkbox->Bind(wxEVT_CHECKBOX, &GeneralConfigPane::OnCheatCheckBoxChanged, this);
|
||||
m_force_ntscj_checkbox->Bind(wxEVT_CHECKBOX, &GeneralConfigPane::OnForceNTSCJCheckBoxChanged, this);
|
||||
m_frame_limit_choice->Bind(wxEVT_CHOICE, &GeneralConfigPane::OnFrameLimitChoiceChanged, this);
|
||||
m_cpu_engine_radiobox->Bind(wxEVT_RADIOBOX, &GeneralConfigPane::OnCPUEngineRadioBoxChanged, this);
|
||||
|
||||
wxBoxSizer* const frame_limit_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
frame_limit_sizer->Add(new wxStaticText(this, wxID_ANY, _("Framelimit:")), 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM, 5);
|
||||
frame_limit_sizer->Add(m_frame_limit_choice, 0, wxLEFT | wxRIGHT | wxBOTTOM | wxEXPAND, 5);
|
||||
|
||||
wxStaticBoxSizer* const basic_settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Basic Settings"));
|
||||
basic_settings_sizer->Add(m_dual_core_checkbox, 0, wxALL, 5);
|
||||
basic_settings_sizer->Add(m_idle_skip_checkbox, 0, wxALL, 5);
|
||||
basic_settings_sizer->Add(m_cheats_checkbox, 0, wxALL, 5);
|
||||
basic_settings_sizer->Add(frame_limit_sizer);
|
||||
|
||||
wxStaticBoxSizer* const advanced_settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Advanced Settings"));
|
||||
advanced_settings_sizer->Add(m_cpu_engine_radiobox, 0, wxALL, 5);
|
||||
advanced_settings_sizer->Add(m_force_ntscj_checkbox, 0, wxALL, 5);
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(basic_settings_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
main_sizer->Add(advanced_settings_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
}
|
||||
|
||||
void GeneralConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
m_dual_core_checkbox->SetValue(startup_params.bCPUThread);
|
||||
m_idle_skip_checkbox->SetValue(startup_params.bSkipIdle);
|
||||
m_cheats_checkbox->SetValue(startup_params.bEnableCheats);
|
||||
m_force_ntscj_checkbox->SetValue(startup_params.bForceNTSCJ);
|
||||
m_frame_limit_choice->SetSelection(SConfig::GetInstance().m_Framelimit);
|
||||
|
||||
for (size_t i = 0; i < (sizeof(cpu_cores) / sizeof(CPUCore)); ++i)
|
||||
{
|
||||
if (cpu_cores[i].CPUid == startup_params.iCPUCore)
|
||||
m_cpu_engine_radiobox->SetSelection(i);
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralConfigPane::RefreshGUI()
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
m_dual_core_checkbox->Disable();
|
||||
m_idle_skip_checkbox->Disable();
|
||||
m_cheats_checkbox->Disable();
|
||||
m_force_ntscj_checkbox->Disable();
|
||||
m_cpu_engine_radiobox->Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnDualCoreCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
return;
|
||||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = m_dual_core_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnIdleSkipCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = m_idle_skip_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnCheatCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = m_cheats_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnForceNTSCJCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = m_force_ntscj_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnFrameLimitChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_Framelimit = m_frame_limit_choice->GetSelection();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnCPUEngineRadioBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
const int selection = m_cpu_engine_radiobox->GetSelection();
|
||||
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
|
||||
bool using_interp = (SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore == PowerPC::CORE_INTERPRETER);
|
||||
main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, using_interp);
|
||||
}
|
||||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = cpu_cores[selection].CPUid;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxCheckBox;
|
||||
class wxCommandEvent;
|
||||
class wxChoice;
|
||||
class wxRadioBox;
|
||||
|
||||
class GeneralConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
GeneralConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void RefreshGUI();
|
||||
|
||||
void OnDualCoreCheckBoxChanged(wxCommandEvent&);
|
||||
void OnIdleSkipCheckBoxChanged(wxCommandEvent&);
|
||||
void OnCheatCheckBoxChanged(wxCommandEvent&);
|
||||
void OnForceNTSCJCheckBoxChanged(wxCommandEvent&);
|
||||
void OnFrameLimitChoiceChanged(wxCommandEvent&);
|
||||
void OnCPUEngineRadioBoxChanged(wxCommandEvent&);
|
||||
|
||||
wxArrayString m_frame_limit_array_string;
|
||||
wxArrayString m_cpu_engine_array_string;
|
||||
|
||||
wxCheckBox* m_dual_core_checkbox;
|
||||
wxCheckBox* m_idle_skip_checkbox;
|
||||
wxCheckBox* m_cheats_checkbox;
|
||||
wxCheckBox* m_force_ntscj_checkbox;
|
||||
|
||||
wxChoice* m_frame_limit_choice;
|
||||
|
||||
wxRadioBox* m_cpu_engine_radiobox;
|
||||
};
|
|
@ -0,0 +1,256 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/language.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Common/CommonPaths.h"
|
||||
#include "Common/FileSearch.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/HotkeyManager.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
#include "DolphinWX/InputConfigDiag.h"
|
||||
#include "DolphinWX/Main.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/InterfaceConfigPane.h"
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
#include "DolphinWX/X11Utils.h"
|
||||
#endif
|
||||
|
||||
static const wxLanguage language_ids[] =
|
||||
{
|
||||
wxLANGUAGE_DEFAULT,
|
||||
|
||||
wxLANGUAGE_CATALAN,
|
||||
wxLANGUAGE_CZECH,
|
||||
wxLANGUAGE_GERMAN,
|
||||
wxLANGUAGE_ENGLISH,
|
||||
wxLANGUAGE_SPANISH,
|
||||
wxLANGUAGE_FRENCH,
|
||||
wxLANGUAGE_ITALIAN,
|
||||
wxLANGUAGE_HUNGARIAN,
|
||||
wxLANGUAGE_DUTCH,
|
||||
wxLANGUAGE_NORWEGIAN_BOKMAL,
|
||||
wxLANGUAGE_POLISH,
|
||||
wxLANGUAGE_PORTUGUESE,
|
||||
wxLANGUAGE_PORTUGUESE_BRAZILIAN,
|
||||
wxLANGUAGE_SERBIAN,
|
||||
wxLANGUAGE_SWEDISH,
|
||||
wxLANGUAGE_TURKISH,
|
||||
|
||||
wxLANGUAGE_GREEK,
|
||||
wxLANGUAGE_RUSSIAN,
|
||||
wxLANGUAGE_HEBREW,
|
||||
wxLANGUAGE_ARABIC,
|
||||
wxLANGUAGE_FARSI,
|
||||
wxLANGUAGE_KOREAN,
|
||||
wxLANGUAGE_JAPANESE,
|
||||
wxLANGUAGE_CHINESE_SIMPLIFIED,
|
||||
wxLANGUAGE_CHINESE_TRADITIONAL,
|
||||
};
|
||||
|
||||
InterfaceConfigPane::InterfaceConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::InitializeGUI()
|
||||
{
|
||||
// GUI language arrayStrings
|
||||
// keep these in sync with the langIds array at the beginning of this file
|
||||
m_interface_lang_strings.Add(_("<System Language>"));
|
||||
m_interface_lang_strings.Add(L"Catal\u00E0"); // Catalan
|
||||
m_interface_lang_strings.Add(L"\u010Ce\u0161tina"); // Czech
|
||||
m_interface_lang_strings.Add(L"Deutsch"); // German
|
||||
m_interface_lang_strings.Add(L"English"); // English
|
||||
m_interface_lang_strings.Add(L"Espa\u00F1ol"); // Spanish
|
||||
m_interface_lang_strings.Add(L"Fran\u00E7ais"); // French
|
||||
m_interface_lang_strings.Add(L"Italiano"); // Italian
|
||||
m_interface_lang_strings.Add(L"Magyar"); // Hungarian
|
||||
m_interface_lang_strings.Add(L"Nederlands"); // Dutch
|
||||
m_interface_lang_strings.Add(L"Norsk bokm\u00E5l"); // Norwegian
|
||||
m_interface_lang_strings.Add(L"Polski"); // Polish
|
||||
m_interface_lang_strings.Add(L"Portugu\u00EAs"); // Portuguese
|
||||
m_interface_lang_strings.Add(L"Portugu\u00EAs (Brasil)"); // Portuguese (Brazil)
|
||||
m_interface_lang_strings.Add(L"Srpski"); // Serbian
|
||||
m_interface_lang_strings.Add(L"Svenska"); // Swedish
|
||||
m_interface_lang_strings.Add(L"T\u00FCrk\u00E7e"); // Turkish
|
||||
m_interface_lang_strings.Add(L"\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC"); // Greek
|
||||
m_interface_lang_strings.Add(L"\u0420\u0443\u0441\u0441\u043A\u0438\u0439"); // Russian
|
||||
m_interface_lang_strings.Add(L"\u05E2\u05D1\u05E8\u05D9\u05EA"); // Hebrew
|
||||
m_interface_lang_strings.Add(L"\u0627\u0644\u0639\u0631\u0628\u064A\u0629"); // Arabic
|
||||
m_interface_lang_strings.Add(L"\u0641\u0627\u0631\u0633\u06CC"); // Farsi
|
||||
m_interface_lang_strings.Add(L"\uD55C\uAD6D\uC5B4"); // Korean
|
||||
m_interface_lang_strings.Add(L"\u65E5\u672C\u8A9E"); // Japanese
|
||||
m_interface_lang_strings.Add(L"\u7B80\u4F53\u4E2D\u6587"); // Simplified Chinese
|
||||
m_interface_lang_strings.Add(L"\u7E41\u9AD4\u4E2D\u6587"); // Traditional Chinese
|
||||
|
||||
m_confirm_stop_checkbox = new wxCheckBox(this, wxID_ANY, _("Confirm on Stop"));
|
||||
m_panic_handlers_checkbox = new wxCheckBox(this, wxID_ANY, _("Use Panic Handlers"));
|
||||
m_osd_messages_checkbox = new wxCheckBox(this, wxID_ANY, _("On-Screen Display Messages"));
|
||||
m_pause_focus_lost_checkbox = new wxCheckBox(this, wxID_ANY, _("Pause on Focus Lost"));
|
||||
m_interface_lang_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_interface_lang_strings);
|
||||
m_hotkey_config_button = new wxButton(this, wxID_ANY, _("Hotkeys"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
m_theme_choice = new wxChoice(this, wxID_ANY);
|
||||
|
||||
m_confirm_stop_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnConfirmStopCheckBoxChanged, this);
|
||||
m_panic_handlers_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnPanicHandlersCheckBoxChanged, this);
|
||||
m_osd_messages_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnOSDMessagesCheckBoxChanged, this);
|
||||
m_pause_focus_lost_checkbox->Bind(wxEVT_CHECKBOX, &InterfaceConfigPane::OnPauseOnFocusLostCheckBoxChanged, this);
|
||||
m_interface_lang_choice->Bind(wxEVT_CHOICE, &InterfaceConfigPane::OnInterfaceLanguageChoiceChanged, this);
|
||||
m_theme_choice->Bind(wxEVT_CHOICE, &InterfaceConfigPane::OnThemeSelected, this);
|
||||
|
||||
m_confirm_stop_checkbox->SetToolTip(_("Show a confirmation box before stopping a game."));
|
||||
m_panic_handlers_checkbox->SetToolTip(_("Show a message box when a potentially serious error has occurred.\nDisabling this may avoid annoying and non-fatal messages, but it may result in major crashes having no explanation at all."));
|
||||
m_osd_messages_checkbox->SetToolTip(_("Display messages over the emulation screen area.\nThese messages include memory card writes, video backend and CPU information, and JIT cache clearing."));
|
||||
m_pause_focus_lost_checkbox->SetToolTip(_("Pauses the emulator when focus is taken away from the emulation window."));
|
||||
m_interface_lang_choice->SetToolTip(_("Change the language of the user interface.\nRequires restart."));
|
||||
|
||||
wxBoxSizer* const language_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
language_sizer->Add(new wxStaticText(this, wxID_ANY, _("Language:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
language_sizer->Add(m_interface_lang_choice, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
language_sizer->AddStretchSpacer();
|
||||
language_sizer->Add(m_hotkey_config_button, 0, wxALIGN_RIGHT | wxALL, 5);
|
||||
|
||||
wxBoxSizer* const theme_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
theme_sizer->Add(new wxStaticText(this, wxID_ANY, _("Theme:")), 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
theme_sizer->Add(m_theme_choice, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
theme_sizer->AddStretchSpacer();
|
||||
|
||||
wxStaticBoxSizer* const main_static_box_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Interface Settings"));
|
||||
main_static_box_sizer->Add(m_confirm_stop_checkbox, 0, wxALL, 5);
|
||||
main_static_box_sizer->Add(m_panic_handlers_checkbox, 0, wxALL, 5);
|
||||
main_static_box_sizer->Add(m_osd_messages_checkbox, 0, wxALL, 5);
|
||||
main_static_box_sizer->Add(m_pause_focus_lost_checkbox, 0, wxALL, 5);
|
||||
main_static_box_sizer->Add(theme_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
main_static_box_sizer->Add(language_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
wxBoxSizer* const main_box_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_box_sizer->Add(main_static_box_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_box_sizer);
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
m_confirm_stop_checkbox->SetValue(startup_params.bConfirmStop);
|
||||
m_panic_handlers_checkbox->SetValue(startup_params.bUsePanicHandlers);
|
||||
m_osd_messages_checkbox->SetValue(startup_params.bOnScreenDisplayMessages);
|
||||
m_pause_focus_lost_checkbox->SetValue(SConfig::GetInstance().m_PauseOnFocusLost);
|
||||
|
||||
for (size_t i = 0; i < sizeof(language_ids) / sizeof(wxLanguage); i++)
|
||||
{
|
||||
if (language_ids [i] == SConfig::GetInstance().m_InterfaceLanguage)
|
||||
{
|
||||
m_interface_lang_choice->SetSelection(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
LoadThemes();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::LoadThemes()
|
||||
{
|
||||
CFileSearch::XStringVector theme_dirs;
|
||||
theme_dirs.push_back(File::GetUserPath(D_THEMES_IDX));
|
||||
theme_dirs.push_back(File::GetSysDirectory() + THEMES_DIR);
|
||||
|
||||
CFileSearch cfs(CFileSearch::XStringVector(1, "*"), theme_dirs);
|
||||
auto const& sv = cfs.GetFileNames();
|
||||
for (const std::string& filename : sv)
|
||||
{
|
||||
std::string name, ext;
|
||||
SplitPath(filename, nullptr, &name, &ext);
|
||||
|
||||
name += ext;
|
||||
const wxString wxname = StrToWxStr(name);
|
||||
if (-1 == m_theme_choice->FindString(wxname))
|
||||
m_theme_choice->Append(wxname);
|
||||
}
|
||||
|
||||
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnHotkeyConfigButtonClicked(wxCommandEvent& event)
|
||||
{
|
||||
bool was_init = false;
|
||||
|
||||
InputConfig* const hotkey_plugin = HotkeyManagerEmu::GetConfig();
|
||||
|
||||
// check if game is running
|
||||
if (g_controller_interface.IsInit())
|
||||
{
|
||||
was_init = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
Window win = X11Utils::XWindowFromHandle(GetHandle());
|
||||
HotkeyManagerEmu::Initialize(reinterpret_cast<void*>(win));
|
||||
#else
|
||||
HotkeyManagerEmu::Initialize(reinterpret_cast<void*>(GetHandle()));
|
||||
#endif
|
||||
}
|
||||
|
||||
InputConfigDialog m_ConfigFrame(this, *hotkey_plugin, _("Dolphin Hotkeys"));
|
||||
m_ConfigFrame.ShowModal();
|
||||
|
||||
// if game isn't running
|
||||
if (!was_init)
|
||||
HotkeyManagerEmu::Shutdown();
|
||||
|
||||
// Update the GUI in case menu accelerators were changed
|
||||
main_frame->UpdateGUI();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnConfirmStopCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop = m_confirm_stop_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnPanicHandlersCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = m_panic_handlers_checkbox->IsChecked();
|
||||
SetEnableAlert(m_panic_handlers_checkbox->IsChecked());
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnOSDMessagesCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bOnScreenDisplayMessages = m_osd_messages_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnInterfaceLanguageChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
if (SConfig::GetInstance().m_InterfaceLanguage != language_ids[m_interface_lang_choice->GetSelection()])
|
||||
SuccessAlertT("You must restart Dolphin in order for the change to take effect.");
|
||||
|
||||
SConfig::GetInstance().m_InterfaceLanguage = language_ids[m_interface_lang_choice->GetSelection()];
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnPauseOnFocusLostCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_PauseOnFocusLost = m_pause_focus_lost_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnThemeSelected(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = WxStrToStr(m_theme_choice->GetStringSelection());
|
||||
|
||||
main_frame->InitBitmaps();
|
||||
main_frame->UpdateGameList();
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxButton;
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
class wxCommandEvent;
|
||||
|
||||
class InterfaceConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
InterfaceConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void LoadThemes();
|
||||
|
||||
void OnHotkeyConfigButtonClicked(wxCommandEvent&);
|
||||
void OnConfirmStopCheckBoxChanged(wxCommandEvent&);
|
||||
void OnPanicHandlersCheckBoxChanged(wxCommandEvent&);
|
||||
void OnOSDMessagesCheckBoxChanged(wxCommandEvent&);
|
||||
void OnInterfaceLanguageChoiceChanged(wxCommandEvent&);
|
||||
void OnPauseOnFocusLostCheckBoxChanged(wxCommandEvent&);
|
||||
void OnThemeSelected(wxCommandEvent&);
|
||||
|
||||
wxArrayString m_interface_lang_strings;
|
||||
|
||||
wxButton* m_hotkey_config_button;
|
||||
wxCheckBox* m_confirm_stop_checkbox;
|
||||
wxCheckBox* m_panic_handlers_checkbox;
|
||||
wxCheckBox* m_osd_messages_checkbox;
|
||||
wxCheckBox* m_pause_focus_lost_checkbox;
|
||||
wxChoice* m_interface_lang_choice;
|
||||
wxChoice* m_theme_choice;
|
||||
};
|
|
@ -0,0 +1,197 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <wx/button.h>
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/dirdlg.h>
|
||||
#include <wx/filepicker.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "DiscIO/NANDContentLoader.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
#include "DolphinWX/Main.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/ConfigMain.h"
|
||||
#include "DolphinWX/Config/PathConfigPane.h"
|
||||
|
||||
PathConfigPane::PathConfigPane(wxWindow* panel, wxWindowID id)
|
||||
: wxPanel(panel, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
RefreshGUI();
|
||||
}
|
||||
|
||||
void PathConfigPane::InitializeGUI()
|
||||
{
|
||||
m_iso_paths_listbox = new wxListBox(this, wxID_ANY);
|
||||
m_recursive_iso_paths_checkbox = new wxCheckBox(this, wxID_ANY, _("Search Subfolders"));
|
||||
m_add_iso_path_button = new wxButton(this, wxID_ANY, _("Add..."));
|
||||
m_remove_iso_path_button = new wxButton(this, wxID_ANY, _("Remove"));
|
||||
m_remove_iso_path_button->Disable();
|
||||
|
||||
m_default_iso_filepicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose a default ISO:"),
|
||||
_("All GC/Wii files (elf, dol, gcm, iso, wbfs, ciso, gcz, wad)") + wxString::Format("|*.elf;*.dol;*.gcm;*.iso;*.wbfs;*.ciso;*.gcz;*.wad|%s", wxGetTranslation(wxALL_FILES)),
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN);
|
||||
m_dvd_root_dirpicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose a DVD root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
||||
m_apploader_path_filepicker = new wxFilePickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose file to use as apploader: (applies to discs constructed from directories only)"),
|
||||
_("apploader (.img)") + wxString::Format("|*.img|%s", wxGetTranslation(wxALL_FILES)),
|
||||
wxDefaultPosition, wxDefaultSize, wxFLP_USE_TEXTCTRL | wxFLP_OPEN);
|
||||
m_nand_root_dirpicker = new wxDirPickerCtrl(this, wxID_ANY, wxEmptyString, _("Choose a NAND root directory:"), wxDefaultPosition, wxDefaultSize, wxDIRP_USE_TEXTCTRL);
|
||||
|
||||
m_iso_paths_listbox->Bind(wxEVT_LISTBOX, &PathConfigPane::OnISOPathSelectionChanged, this);
|
||||
m_recursive_iso_paths_checkbox->Bind(wxEVT_CHECKBOX, &PathConfigPane::OnRecursiveISOCheckBoxChanged, this);
|
||||
m_add_iso_path_button->Bind(wxEVT_BUTTON, &PathConfigPane::OnAddISOPath, this);
|
||||
m_remove_iso_path_button->Bind(wxEVT_BUTTON, &PathConfigPane::OnRemoveISOPath, this);
|
||||
m_default_iso_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnDefaultISOChanged, this);
|
||||
m_dvd_root_dirpicker->Bind(wxEVT_DIRPICKER_CHANGED, &PathConfigPane::OnDVDRootChanged, this);
|
||||
m_apploader_path_filepicker->Bind(wxEVT_FILEPICKER_CHANGED, &PathConfigPane::OnApploaderPathChanged, this);
|
||||
m_nand_root_dirpicker->Bind(wxEVT_DIRPICKER_CHANGED, &PathConfigPane::OnNANDRootChanged, this);
|
||||
|
||||
wxBoxSizer* const iso_button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
iso_button_sizer->Add(m_recursive_iso_paths_checkbox, 0, wxALL | wxALIGN_CENTER);
|
||||
iso_button_sizer->AddStretchSpacer();
|
||||
iso_button_sizer->Add(m_add_iso_path_button, 0, wxALL);
|
||||
iso_button_sizer->Add(m_remove_iso_path_button, 0, wxALL);
|
||||
|
||||
wxStaticBoxSizer* const iso_listbox_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("ISO Directories"));
|
||||
iso_listbox_sizer->Add(m_iso_paths_listbox, 1, wxEXPAND | wxALL, 0);
|
||||
iso_listbox_sizer->Add(iso_button_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
wxGridBagSizer* const picker_sizer = new wxGridBagSizer();
|
||||
picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("Default ISO:")),
|
||||
wxGBPosition(0, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
picker_sizer->Add(m_default_iso_filepicker, wxGBPosition(0, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("DVD Root:")),
|
||||
wxGBPosition(1, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
picker_sizer->Add(m_dvd_root_dirpicker, wxGBPosition(1, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("Apploader:")),
|
||||
wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
picker_sizer->Add(m_apploader_path_filepicker, wxGBPosition(2, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
picker_sizer->Add(new wxStaticText(this, wxID_ANY, _("Wii NAND Root:")),
|
||||
wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
picker_sizer->Add(m_nand_root_dirpicker, wxGBPosition(3, 1), wxDefaultSpan, wxEXPAND | wxALL, 5);
|
||||
picker_sizer->AddGrowableCol(1);
|
||||
|
||||
// Populate the Paths page
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(iso_listbox_sizer, 1, wxEXPAND | wxALL, 5);
|
||||
main_sizer->Add(picker_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
}
|
||||
|
||||
void PathConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
|
||||
m_recursive_iso_paths_checkbox->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
|
||||
m_default_iso_filepicker->SetPath(StrToWxStr(startup_params.m_strDefaultISO));
|
||||
m_dvd_root_dirpicker->SetPath(StrToWxStr(startup_params.m_strDVDRoot));
|
||||
m_apploader_path_filepicker->SetPath(StrToWxStr(startup_params.m_strApploader));
|
||||
m_nand_root_dirpicker->SetPath(StrToWxStr(SConfig::GetInstance().m_NANDPath));
|
||||
|
||||
// Update selected ISO paths
|
||||
for (const std::string& folder : SConfig::GetInstance().m_ISOFolder)
|
||||
m_iso_paths_listbox->Append(StrToWxStr(folder));
|
||||
}
|
||||
|
||||
void PathConfigPane::RefreshGUI()
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
Disable();
|
||||
}
|
||||
|
||||
void PathConfigPane::OnISOPathSelectionChanged(wxCommandEvent& event)
|
||||
{
|
||||
m_remove_iso_path_button->Enable(m_iso_paths_listbox->GetSelection() != wxNOT_FOUND);
|
||||
}
|
||||
|
||||
void PathConfigPane::OnRecursiveISOCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_RecursiveISOFolder = m_recursive_iso_paths_checkbox->IsChecked();
|
||||
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
}
|
||||
|
||||
void PathConfigPane::OnAddISOPath(wxCommandEvent& event)
|
||||
{
|
||||
wxDirDialog dialog(this, _("Choose a directory to add"), wxGetHomeDir(),
|
||||
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
|
||||
|
||||
if (dialog.ShowModal() == wxID_OK)
|
||||
{
|
||||
if (m_iso_paths_listbox->FindString(dialog.GetPath()) != wxNOT_FOUND)
|
||||
{
|
||||
WxUtils::ShowErrorDialog(_("The chosen directory is already in the list."));
|
||||
}
|
||||
else
|
||||
{
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
m_iso_paths_listbox->Append(dialog.GetPath());
|
||||
}
|
||||
}
|
||||
|
||||
SaveISOPathChanges();
|
||||
}
|
||||
|
||||
void PathConfigPane::OnRemoveISOPath(wxCommandEvent& event)
|
||||
{
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
m_iso_paths_listbox->Delete(m_iso_paths_listbox->GetSelection());
|
||||
|
||||
// This seems to not be activated on Windows when it should be. wxw bug?
|
||||
#ifdef _WIN32
|
||||
OnISOPathSelectionChanged(wxCommandEvent());
|
||||
#endif
|
||||
|
||||
SaveISOPathChanges();
|
||||
}
|
||||
|
||||
void PathConfigPane::OnDefaultISOChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = WxStrToStr(m_default_iso_filepicker->GetPath());
|
||||
}
|
||||
|
||||
void PathConfigPane::OnDVDRootChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDVDRoot = WxStrToStr(m_dvd_root_dirpicker->GetPath());
|
||||
}
|
||||
|
||||
void PathConfigPane::OnApploaderPathChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strApploader = WxStrToStr(m_apploader_path_filepicker->GetPath());
|
||||
}
|
||||
|
||||
void PathConfigPane::OnNANDRootChanged(wxCommandEvent& event)
|
||||
{
|
||||
std::string nand_path =
|
||||
SConfig::GetInstance().m_NANDPath =
|
||||
WxStrToStr(m_nand_root_dirpicker->GetPath());
|
||||
|
||||
File::SetUserPath(D_WIIROOT_IDX, nand_path);
|
||||
m_nand_root_dirpicker->SetPath(StrToWxStr(nand_path));
|
||||
|
||||
SConfig::GetInstance().m_SYSCONF->UpdateLocation();
|
||||
DiscIO::cUIDsys::AccessInstance().UpdateLocation();
|
||||
DiscIO::CSharedContent::AccessInstance().UpdateLocation();
|
||||
|
||||
main_frame->UpdateWiiMenuChoice();
|
||||
}
|
||||
|
||||
void PathConfigPane::SaveISOPathChanges()
|
||||
{
|
||||
SConfig::GetInstance().m_ISOFolder.clear();
|
||||
|
||||
for (unsigned int i = 0; i < m_iso_paths_listbox->GetCount(); i++)
|
||||
SConfig::GetInstance().m_ISOFolder.push_back(WxStrToStr(m_iso_paths_listbox->GetStrings()[i]));
|
||||
}
|
||||
|
|
@ -0,0 +1,46 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/panel.h>
|
||||
|
||||
class wxButton;
|
||||
class wxCheckBox;
|
||||
class wxCommandEvent;
|
||||
class wxListBox;
|
||||
class wxDirPickerCtrl;
|
||||
class wxFilePickerCtrl;
|
||||
|
||||
class PathConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
PathConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void RefreshGUI();
|
||||
|
||||
void OnISOPathSelectionChanged(wxCommandEvent&);
|
||||
void OnRecursiveISOCheckBoxChanged(wxCommandEvent&);
|
||||
void OnAddISOPath(wxCommandEvent&);
|
||||
void OnRemoveISOPath(wxCommandEvent&);
|
||||
void OnDefaultISOChanged(wxCommandEvent&);
|
||||
void OnDVDRootChanged(wxCommandEvent&);
|
||||
void OnApploaderPathChanged(wxCommandEvent&);
|
||||
void OnNANDRootChanged(wxCommandEvent&);
|
||||
|
||||
void SaveISOPathChanges();
|
||||
|
||||
wxListBox* m_iso_paths_listbox;
|
||||
wxCheckBox* m_recursive_iso_paths_checkbox;
|
||||
wxButton* m_add_iso_path_button;
|
||||
wxButton* m_remove_iso_path_button;
|
||||
|
||||
wxDirPickerCtrl* m_dvd_root_dirpicker;
|
||||
wxDirPickerCtrl* m_nand_root_dirpicker;
|
||||
wxFilePickerCtrl* m_default_iso_filepicker;
|
||||
wxFilePickerCtrl* m_apploader_path_filepicker;
|
||||
};
|
|
@ -0,0 +1,178 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <wx/checkbox.h>
|
||||
#include <wx/choice.h>
|
||||
#include <wx/gbsizer.h>
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/stattext.h>
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/IPC_HLE/WII_IPC_HLE.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Config/WiiConfigPane.h"
|
||||
|
||||
WiiConfigPane::WiiConfigPane(wxWindow* parent, wxWindowID id)
|
||||
: wxPanel(parent, id)
|
||||
{
|
||||
InitializeGUI();
|
||||
LoadGUIValues();
|
||||
RefreshGUI();
|
||||
}
|
||||
|
||||
void WiiConfigPane::InitializeGUI()
|
||||
{
|
||||
m_aspect_ratio_strings.Add("4:3");
|
||||
m_aspect_ratio_strings.Add("16:9");
|
||||
|
||||
m_system_language_strings.Add(_("Japanese"));
|
||||
m_system_language_strings.Add(_("English"));
|
||||
m_system_language_strings.Add(_("German"));
|
||||
m_system_language_strings.Add(_("French"));
|
||||
m_system_language_strings.Add(_("Spanish"));
|
||||
m_system_language_strings.Add(_("Italian"));
|
||||
m_system_language_strings.Add(_("Dutch"));
|
||||
m_system_language_strings.Add(_("Simplified Chinese"));
|
||||
m_system_language_strings.Add(_("Traditional Chinese"));
|
||||
m_system_language_strings.Add(_("Korean"));
|
||||
|
||||
m_screensaver_checkbox = new wxCheckBox(this, wxID_ANY, _("Enable Screen Saver"));
|
||||
m_pal60_mode_checkbox = new wxCheckBox(this, wxID_ANY, _("Use PAL60 Mode (EuRGB60)"));
|
||||
m_aspect_ratio_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_aspect_ratio_strings);
|
||||
m_system_language_choice = new wxChoice(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_system_language_strings);
|
||||
m_sd_card_checkbox = new wxCheckBox(this, wxID_ANY, _("Insert SD Card"));
|
||||
m_connect_keyboard_checkbox = new wxCheckBox(this, wxID_ANY, _("Connect USB Keyboard"));
|
||||
|
||||
m_screensaver_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnScreenSaverCheckBoxChanged, this);
|
||||
m_pal60_mode_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnPAL60CheckBoxChanged, this);
|
||||
m_aspect_ratio_choice->Bind(wxEVT_CHOICE, &WiiConfigPane::OnAspectRatioChoiceChanged, this);
|
||||
m_system_language_choice->Bind(wxEVT_CHOICE, &WiiConfigPane::OnSystemLanguageChoiceChanged, this);
|
||||
m_sd_card_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnSDCardCheckBoxChanged, this);
|
||||
m_connect_keyboard_checkbox->Bind(wxEVT_CHECKBOX, &WiiConfigPane::OnConnectKeyboardCheckBoxChanged, this);
|
||||
|
||||
m_screensaver_checkbox->SetToolTip(_("Dims the screen after five minutes of inactivity."));
|
||||
m_pal60_mode_checkbox->SetToolTip(_("Sets the Wii display mode to 60Hz (480i) instead of 50Hz (576i) for PAL games.\nMay not work for all games."));
|
||||
m_system_language_choice->SetToolTip(_("Sets the Wii system language."));
|
||||
m_sd_card_checkbox->SetToolTip(_("Saved to /Wii/sd.raw (default size is 128mb)"));
|
||||
m_connect_keyboard_checkbox->SetToolTip(_("May cause slow down in Wii Menu and some games."));
|
||||
|
||||
wxGridBagSizer* const misc_settings_grid_sizer = new wxGridBagSizer();
|
||||
misc_settings_grid_sizer->Add(m_screensaver_checkbox, wxGBPosition(0, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
misc_settings_grid_sizer->Add(m_pal60_mode_checkbox, wxGBPosition(1, 0), wxGBSpan(1, 2), wxALL, 5);
|
||||
misc_settings_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("Aspect Ratio:")), wxGBPosition(2, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
misc_settings_grid_sizer->Add(m_aspect_ratio_choice, wxGBPosition(2, 1), wxDefaultSpan, wxALL, 5);
|
||||
misc_settings_grid_sizer->Add(new wxStaticText(this, wxID_ANY, _("System Language:")), wxGBPosition(3, 0), wxDefaultSpan, wxALIGN_CENTER_VERTICAL | wxALL, 5);
|
||||
misc_settings_grid_sizer->Add(m_system_language_choice, wxGBPosition(3, 1), wxDefaultSpan, wxALL, 5);
|
||||
|
||||
wxStaticBoxSizer* const misc_settings_static_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Misc Settings"));
|
||||
misc_settings_static_sizer->Add(misc_settings_grid_sizer);
|
||||
|
||||
wxStaticBoxSizer* const device_settings_sizer = new wxStaticBoxSizer(wxVERTICAL, this, _("Device Settings"));
|
||||
device_settings_sizer->Add(m_sd_card_checkbox, 0, wxALL, 5);
|
||||
device_settings_sizer->Add(m_connect_keyboard_checkbox, 0, wxALL, 5);
|
||||
|
||||
wxBoxSizer* const main_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
main_sizer->Add(misc_settings_static_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
main_sizer->Add(device_settings_sizer, 0, wxEXPAND | wxALL, 5);
|
||||
|
||||
SetSizer(main_sizer);
|
||||
}
|
||||
|
||||
void WiiConfigPane::LoadGUIValues()
|
||||
{
|
||||
m_screensaver_checkbox->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.SSV"));
|
||||
m_pal60_mode_checkbox->SetValue(!!SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.E60"));
|
||||
m_aspect_ratio_choice->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.AR"));
|
||||
m_system_language_choice->SetSelection(SConfig::GetInstance().m_SYSCONF->GetData<u8>("IPL.LNG"));
|
||||
|
||||
m_sd_card_checkbox->SetValue(SConfig::GetInstance().m_WiiSDCard);
|
||||
m_connect_keyboard_checkbox->SetValue(SConfig::GetInstance().m_WiiKeyboard);
|
||||
}
|
||||
|
||||
void WiiConfigPane::RefreshGUI()
|
||||
{
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
m_screensaver_checkbox->Disable();
|
||||
m_pal60_mode_checkbox->Disable();
|
||||
m_aspect_ratio_choice->Disable();
|
||||
m_system_language_choice->Disable();
|
||||
}
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnScreenSaverCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.SSV", m_screensaver_checkbox->IsChecked());
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnPAL60CheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.E60", m_pal60_mode_checkbox->IsChecked());
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnSDCardCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_WiiSDCard = m_sd_card_checkbox->IsChecked();
|
||||
WII_IPC_HLE_Interface::SDIO_EventNotify();
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnConnectKeyboardCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_WiiKeyboard = m_connect_keyboard_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnSystemLanguageChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
int wii_system_lang = m_system_language_choice->GetSelection();
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.LNG", wii_system_lang);
|
||||
u8 country_code = GetSADRCountryCode(wii_system_lang);
|
||||
|
||||
if (!SConfig::GetInstance().m_SYSCONF->SetArrayData("IPL.SADR", &country_code, 1))
|
||||
WxUtils::ShowErrorDialog(_("Failed to update country code in SYSCONF"));
|
||||
}
|
||||
|
||||
void WiiConfigPane::OnAspectRatioChoiceChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.AR", m_aspect_ratio_choice->GetSelection());
|
||||
}
|
||||
|
||||
// Change from IPL.LNG value to IPL.SADR country code
|
||||
u8 WiiConfigPane::GetSADRCountryCode(int language)
|
||||
{
|
||||
//http://wiibrew.org/wiki/Country_Codes
|
||||
u8 country_code = language;
|
||||
switch (country_code)
|
||||
{
|
||||
case 0: //Japanese
|
||||
country_code = 1; //Japan
|
||||
break;
|
||||
case 1: //English
|
||||
country_code = 49; //USA
|
||||
break;
|
||||
case 2: //German
|
||||
country_code = 78; //Germany
|
||||
break;
|
||||
case 3: //French
|
||||
country_code = 77; //France
|
||||
break;
|
||||
case 4: //Spanish
|
||||
country_code = 105; //Spain
|
||||
break;
|
||||
case 5: //Italian
|
||||
country_code = 83; //Italy
|
||||
break;
|
||||
case 6: //Dutch
|
||||
country_code = 94; //Netherlands
|
||||
break;
|
||||
case 7: //Simplified Chinese
|
||||
case 8: //Traditional Chinese
|
||||
country_code = 157; //China
|
||||
break;
|
||||
case 9: //Korean
|
||||
country_code = 136; //Korea
|
||||
break;
|
||||
}
|
||||
return country_code;
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
// Copyright 2015 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/panel.h>
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
class wxCommandEvent;
|
||||
|
||||
class WiiConfigPane final : public wxPanel
|
||||
{
|
||||
public:
|
||||
WiiConfigPane(wxWindow* parent, wxWindowID id);
|
||||
|
||||
private:
|
||||
void InitializeGUI();
|
||||
void LoadGUIValues();
|
||||
void RefreshGUI();
|
||||
|
||||
void OnScreenSaverCheckBoxChanged(wxCommandEvent&);
|
||||
void OnPAL60CheckBoxChanged(wxCommandEvent&);
|
||||
void OnSDCardCheckBoxChanged(wxCommandEvent&);
|
||||
void OnConnectKeyboardCheckBoxChanged(wxCommandEvent&);
|
||||
void OnSystemLanguageChoiceChanged(wxCommandEvent&);
|
||||
void OnAspectRatioChoiceChanged(wxCommandEvent&);
|
||||
|
||||
static u8 GetSADRCountryCode(int language);
|
||||
|
||||
wxArrayString m_system_language_strings;
|
||||
wxArrayString m_aspect_ratio_strings;
|
||||
|
||||
wxCheckBox* m_screensaver_checkbox;
|
||||
wxCheckBox* m_pal60_mode_checkbox;
|
||||
wxCheckBox* m_sd_card_checkbox;
|
||||
wxCheckBox* m_connect_keyboard_checkbox;
|
||||
wxChoice* m_system_language_choice;
|
||||
wxChoice* m_aspect_ratio_choice;
|
||||
wxChoice* m_sensor_bar_position_choice;
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -1,278 +0,0 @@
|
|||
// Copyright 2013 Dolphin Emulator Project
|
||||
// Licensed under GPLv2
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
|
||||
#include <wx/arrstr.h>
|
||||
#include <wx/defs.h>
|
||||
#include <wx/dialog.h>
|
||||
#include <wx/event.h>
|
||||
#include <wx/gdicmn.h>
|
||||
#include <wx/string.h>
|
||||
#include <wx/translation.h>
|
||||
#include <wx/windowid.h>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
#include "DolphinWX/X11Utils.h"
|
||||
#endif
|
||||
|
||||
class wxBoxSizer;
|
||||
class wxButton;
|
||||
class wxCheckBox;
|
||||
class wxChoice;
|
||||
class wxDirPickerCtrl;
|
||||
class wxFileDirPickerEvent;
|
||||
class wxFilePickerCtrl;
|
||||
class wxGridBagSizer;
|
||||
class wxListBox;
|
||||
class wxNotebook;
|
||||
class wxPanel;
|
||||
class wxRadioBox;
|
||||
class wxSlider;
|
||||
class wxSpinCtrl;
|
||||
class wxSpinEvent;
|
||||
class wxStaticBoxSizer;
|
||||
class wxStaticText;
|
||||
class wxWindow;
|
||||
|
||||
class CConfigMain : public wxDialog
|
||||
{
|
||||
public:
|
||||
|
||||
CConfigMain(wxWindow* parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& title = _("Dolphin Configuration"),
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
virtual ~CConfigMain();
|
||||
|
||||
void OnOk(wxCommandEvent& event);
|
||||
void CloseClick(wxCommandEvent& event);
|
||||
void OnSelectionChanged(wxCommandEvent& event);
|
||||
void OnConfig(wxCommandEvent& event);
|
||||
void SetSelectedTab(int tab);
|
||||
|
||||
bool bRefreshList;
|
||||
|
||||
enum
|
||||
{
|
||||
ID_NOTEBOOK = 1000,
|
||||
ID_GENERALPAGE,
|
||||
ID_DISPLAYPAGE,
|
||||
ID_AUDIOPAGE,
|
||||
ID_GAMECUBEPAGE,
|
||||
ID_WIIPAGE,
|
||||
ID_PATHSPAGE,
|
||||
ID_ADVANCEDPAGE,
|
||||
};
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
ID_CPUTHREAD = 1010,
|
||||
ID_IDLESKIP,
|
||||
ID_ENABLECHEATS,
|
||||
ID_ENABLEOVERCLOCK,
|
||||
ID_FRAMELIMIT,
|
||||
ID_OVERCLOCK,
|
||||
|
||||
ID_CPUENGINE,
|
||||
|
||||
ID_NTSCJ,
|
||||
|
||||
// Audio Settings
|
||||
ID_DSPENGINE,
|
||||
ID_ENABLE_HLE_AUDIO,
|
||||
ID_ENABLE_THROTTLE,
|
||||
ID_DPL2DECODER,
|
||||
ID_LATENCY,
|
||||
ID_BACKEND,
|
||||
ID_VOLUME,
|
||||
|
||||
// Interface settings
|
||||
ID_INTERFACE_CONFIRMSTOP,
|
||||
ID_INTERFACE_USEPANICHANDLERS,
|
||||
ID_INTERFACE_ONSCREENDISPLAYMESSAGES,
|
||||
ID_INTERFACE_PAUSEONFOCUSLOST,
|
||||
ID_INTERFACE_LANG,
|
||||
ID_HOTKEY_CONFIG,
|
||||
|
||||
ID_GC_SRAM_LNG,
|
||||
ID_GC_ALWAYS_HLE_BS2,
|
||||
|
||||
ID_GC_EXIDEVICE_SLOTA,
|
||||
ID_GC_EXIDEVICE_SLOTA_PATH,
|
||||
ID_GC_EXIDEVICE_SLOTB,
|
||||
ID_GC_EXIDEVICE_SLOTB_PATH,
|
||||
ID_GC_EXIDEVICE_SP1,
|
||||
|
||||
ID_WII_IPL_SSV,
|
||||
ID_WII_IPL_E60,
|
||||
ID_WII_IPL_AR,
|
||||
ID_WII_IPL_LNG,
|
||||
|
||||
ID_WII_SD_CARD,
|
||||
ID_WII_KEYBOARD,
|
||||
|
||||
|
||||
ID_ISOPATHS,
|
||||
ID_RECURSIVEISOPATH,
|
||||
ID_ADDISOPATH,
|
||||
ID_REMOVEISOPATH,
|
||||
|
||||
ID_DEFAULTISO,
|
||||
ID_DVDROOT,
|
||||
ID_APPLOADERPATH,
|
||||
ID_NANDROOT,
|
||||
|
||||
ID_DSP_CB,
|
||||
ID_DSP_CONFIG,
|
||||
ID_DSP_ABOUT,
|
||||
};
|
||||
|
||||
wxNotebook* Notebook;
|
||||
wxPanel* PathsPage;
|
||||
|
||||
// Basic
|
||||
wxCheckBox* CPUThread;
|
||||
wxCheckBox* SkipIdle;
|
||||
wxCheckBox* EnableCheats;
|
||||
wxChoice* Framelimit;
|
||||
|
||||
// Advanced
|
||||
wxRadioBox* CPUEngine;
|
||||
wxCheckBox* ForceNTSCJ;
|
||||
wxSlider* OCSlider;
|
||||
wxStaticText* OCText;
|
||||
wxCheckBox* EnableOC;
|
||||
|
||||
|
||||
wxBoxSizer* sDisplayPage; // Display settings
|
||||
wxStaticBoxSizer* sbInterface; // Display and Interface sections
|
||||
|
||||
|
||||
// Audio
|
||||
wxBoxSizer* sAudioPage; // GC settings
|
||||
wxRadioBox* DSPEngine;
|
||||
wxSlider* VolumeSlider;
|
||||
wxStaticText* VolumeText;
|
||||
wxCheckBox* DPL2Decoder;
|
||||
wxArrayString wxArrayBackends;
|
||||
wxChoice* BackendSelection;
|
||||
wxSpinCtrl* Latency;
|
||||
|
||||
// Interface
|
||||
wxCheckBox* ConfirmStop;
|
||||
wxCheckBox* UsePanicHandlers;
|
||||
wxCheckBox* OnScreenDisplayMessages;
|
||||
wxCheckBox* PauseOnFocusLost;
|
||||
wxChoice* InterfaceLang;
|
||||
wxButton* HotkeyConfig;
|
||||
|
||||
|
||||
wxBoxSizer* sGamecubePage; // GC settings
|
||||
wxStaticBoxSizer* sbGamecubeIPLSettings;
|
||||
wxGridBagSizer* sGamecubeIPLSettings;
|
||||
|
||||
// IPL
|
||||
wxChoice* GCSystemLang;
|
||||
wxCheckBox* GCAlwaysHLE_BS2;
|
||||
|
||||
// Device
|
||||
wxChoice* GCEXIDevice[3];
|
||||
wxButton* GCMemcardPath[2];
|
||||
|
||||
wxBoxSizer* sWiiPage; // Wii settings
|
||||
wxStaticBoxSizer* /*sbWiimoteSettings, **/sbWiiIPLSettings, *sbWiiDeviceSettings; // Wiimote, Misc and Device sections
|
||||
wxGridBagSizer* /*sWiimoteSettings, **/sWiiIPLSettings;
|
||||
|
||||
// Misc
|
||||
wxCheckBox* WiiScreenSaver;
|
||||
wxCheckBox* WiiPAL60;
|
||||
wxChoice* WiiAspectRatio;
|
||||
wxChoice* WiiSystemLang;
|
||||
|
||||
// Device
|
||||
wxCheckBox* WiiSDCard;
|
||||
wxCheckBox* WiiKeyboard;
|
||||
|
||||
|
||||
wxBoxSizer* sPathsPage; // Paths settings
|
||||
wxStaticBoxSizer* sbISOPaths;
|
||||
wxGridBagSizer* sOtherPaths;
|
||||
|
||||
// ISO Directories
|
||||
wxListBox* ISOPaths;
|
||||
wxCheckBox* RecursiveISOPath;
|
||||
wxButton* AddISOPath;
|
||||
wxButton* RemoveISOPath;
|
||||
|
||||
// DefaultISO, DVD Root, Apploader, NANDPath
|
||||
wxFilePickerCtrl* DefaultISO;
|
||||
wxDirPickerCtrl* DVDRoot;
|
||||
wxFilePickerCtrl* ApploaderPath;
|
||||
wxDirPickerCtrl* NANDRoot;
|
||||
|
||||
// Graphics
|
||||
wxChoice* GraphicSelection;
|
||||
wxButton* GraphicConfig;
|
||||
|
||||
wxButton* m_Ok;
|
||||
|
||||
FILE* pStream;
|
||||
|
||||
wxArrayString arrayStringFor_Framelimit;
|
||||
wxArrayString arrayStringFor_CPUEngine;
|
||||
wxArrayString arrayStringFor_DSPEngine;
|
||||
wxArrayString arrayStringFor_FullscreenResolution;
|
||||
wxArrayString arrayStringFor_InterfaceLang;
|
||||
wxArrayString arrayStringFor_GCSystemLang;
|
||||
wxArrayString arrayStringFor_WiiSensBarPos;
|
||||
wxArrayString arrayStringFor_WiiAspectRatio;
|
||||
wxArrayString arrayStringFor_WiiSystemLang;
|
||||
wxArrayString arrayStringFor_ISOPaths;
|
||||
|
||||
void InitializeGUILists();
|
||||
void InitializeGUIValues();
|
||||
void InitializeGUITooltips();
|
||||
|
||||
void CreateGUIControls();
|
||||
void UpdateGUI();
|
||||
void OnClose(wxCloseEvent& event);
|
||||
|
||||
void UpdateCPUClock();
|
||||
void CoreSettingsChanged(wxCommandEvent& event);
|
||||
|
||||
void DisplaySettingsChanged(wxCommandEvent& event);
|
||||
void OnSpin(wxSpinEvent& event);
|
||||
|
||||
void AudioSettingsChanged(wxCommandEvent& event);
|
||||
void AddAudioBackends();
|
||||
|
||||
void GCSettingsChanged(wxCommandEvent& event);
|
||||
void ChooseSlotPath(bool isSlotA, TEXIDevices device_type);
|
||||
void ChooseEXIDevice(wxString deviceName, int deviceNum);
|
||||
|
||||
void WiiSettingsChanged(wxCommandEvent& event);
|
||||
// Change from IPL.LNG value to country code
|
||||
inline u8 GetSADRCountryCode(int language);
|
||||
|
||||
void ISOPathsSelectionChanged(wxCommandEvent& event);
|
||||
void RecursiveDirectoryChanged(wxCommandEvent& event);
|
||||
void AddRemoveISOPaths(wxCommandEvent& event);
|
||||
void DefaultISOChanged(wxFileDirPickerEvent& event);
|
||||
void DVDRootChanged(wxFileDirPickerEvent& event);
|
||||
void ApploaderPathChanged(wxFileDirPickerEvent& WXUNUSED(event));
|
||||
void NANDRootChanged(wxFileDirPickerEvent& event);
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
||||
static bool SupportsVolumeChanges(std::string backend);
|
||||
};
|
|
@ -54,7 +54,14 @@
|
|||
<ClCompile Include="Cheats\CheatsWindow.cpp" />
|
||||
<ClCompile Include="Cheats\CreateCodeDialog.cpp" />
|
||||
<ClCompile Include="Cheats\GeckoCodeDiag.cpp" />
|
||||
<ClCompile Include="ConfigMain.cpp" />
|
||||
<ClCompile Include="Config\AdvancedConfigPane.cpp" />
|
||||
<ClCompile Include="Config\AudioConfigPane.cpp" />
|
||||
<ClCompile Include="Config\ConfigMain.cpp" />
|
||||
<ClCompile Include="Config\GameCubeConfigPane.cpp" />
|
||||
<ClCompile Include="Config\GeneralConfigPane.cpp" />
|
||||
<ClCompile Include="Config\InterfaceConfigPane.cpp" />
|
||||
<ClCompile Include="Config\PathConfigPane.cpp" />
|
||||
<ClCompile Include="Config\WiiConfigPane.cpp" />
|
||||
<ClCompile Include="Debugger\BreakpointDlg.cpp" />
|
||||
<ClCompile Include="Debugger\BreakpointView.cpp" />
|
||||
<ClCompile Include="Debugger\BreakpointWindow.cpp" />
|
||||
|
@ -101,14 +108,21 @@
|
|||
<ClCompile Include="WxUtils.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Config\AdvancedConfigPane.h" />
|
||||
<ClInclude Include="Config\AudioConfigPane.h" />
|
||||
<ClInclude Include="Config\GameCubeConfigPane.h" />
|
||||
<ClInclude Include="Config\GeneralConfigPane.h" />
|
||||
<ClInclude Include="Config\InterfaceConfigPane.h" />
|
||||
<ClInclude Include="Config\PathConfigPane.h" />
|
||||
<ClInclude Include="Config\WiiConfigPane.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
<ClInclude Include="AboutDolphin.h" />
|
||||
<ClInclude Include="ARCodeAddEdit.h" />
|
||||
<ClInclude Include="ConfigMain.h" />
|
||||
<ClInclude Include="Cheats\CheatSearchTab.h" />
|
||||
<ClInclude Include="Cheats\CheatsWindow.h" />
|
||||
<ClInclude Include="Cheats\CreateCodeDialog.h" />
|
||||
<ClInclude Include="Cheats\GeckoCodeDiag.h" />
|
||||
<ClInclude Include="Config\ConfigMain.h" />
|
||||
<ClInclude Include="Debugger\BreakpointDlg.h" />
|
||||
<ClInclude Include="Debugger\BreakpointView.h" />
|
||||
<ClInclude Include="Debugger\BreakpointWindow.h" />
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
<Filter Include="Resources">
|
||||
<UniqueIdentifier>{d6bc4dd6-06ed-46ad-b327-04afb26e10ec}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="GUI\Config">
|
||||
<UniqueIdentifier>{9d8b4144-f335-4fa4-b995-852533298474}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="Main.cpp" />
|
||||
|
@ -121,9 +124,6 @@
|
|||
<ClCompile Include="ARCodeAddEdit.cpp">
|
||||
<Filter>GUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ConfigMain.cpp">
|
||||
<Filter>GUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="FifoPlayerDlg.cpp">
|
||||
<Filter>GUI</Filter>
|
||||
</ClCompile>
|
||||
|
@ -166,6 +166,30 @@
|
|||
<ClCompile Include="ControllerConfigDiag.cpp">
|
||||
<Filter>GUI</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\ConfigMain.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\GeneralConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\InterfaceConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\AudioConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\GameCubeConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\WiiConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\PathConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Config\AdvancedConfigPane.cpp">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Main.h" />
|
||||
|
@ -258,9 +282,6 @@
|
|||
<ClInclude Include="ARCodeAddEdit.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ConfigMain.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="FifoPlayerDlg.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
|
@ -300,6 +321,30 @@
|
|||
<ClInclude Include="ControllerConfigDiag.h">
|
||||
<Filter>GUI</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\ConfigMain.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\GeneralConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\InterfaceConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\AudioConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\GameCubeConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\WiiConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\PathConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Config\AdvancedConfigPane.h">
|
||||
<Filter>GUI\Config</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="CMakeLists.txt" />
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
#include "DiscIO/NANDContentLoader.h"
|
||||
|
||||
#include "DolphinWX/AboutDolphin.h"
|
||||
#include "DolphinWX/ConfigMain.h"
|
||||
#include "DolphinWX/ControllerConfigDiag.h"
|
||||
#include "DolphinWX/FifoPlayerDlg.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
|
@ -81,6 +80,7 @@
|
|||
#include "DolphinWX/WXInputBase.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Cheats/CheatsWindow.h"
|
||||
#include "DolphinWX/Config/ConfigMain.h"
|
||||
#include "DolphinWX/Debugger/BreakpointWindow.h"
|
||||
#include "DolphinWX/Debugger/CodeWindow.h"
|
||||
#include "DolphinWX/Debugger/WatchWindow.h"
|
||||
|
|
Loading…
Reference in New Issue