Options: merge SCoreStartupParameter into SConfig
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
#include "Core/ActionReplay.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/GeckoCode.h"
|
||||
#include "Core/GeckoCodeConfig.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
@@ -154,7 +153,7 @@ void wxCheatsWindow::OnEvent_Close(wxCloseEvent& ev)
|
||||
void wxCheatsWindow::UpdateGUI()
|
||||
{
|
||||
// load code
|
||||
SCoreStartupParameter parameters = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& parameters = SConfig::GetInstance();
|
||||
m_gameini_default = parameters.LoadDefaultGameIni();
|
||||
m_gameini_local = parameters.LoadLocalGameIni();
|
||||
m_gameini_local_path = File::GetUserPath(D_GAMESETTINGS_IDX) + parameters.GetUniqueID() + ".ini";
|
||||
@@ -168,7 +167,7 @@ void wxCheatsWindow::UpdateGUI()
|
||||
|
||||
// write the ISO name in the title
|
||||
if (Core::IsRunning())
|
||||
SetTitle(title + ": " + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + " - " + SConfig::GetInstance().m_LocalCoreStartupParameter.m_strName);
|
||||
SetTitle(title + ": " + parameters.GetUniqueID() + " - " + parameters.m_strName);
|
||||
else
|
||||
SetTitle(title);
|
||||
}
|
||||
@@ -198,7 +197,7 @@ void wxCheatsWindow::Load_ARCodes()
|
||||
|
||||
void wxCheatsWindow::Load_GeckoCodes()
|
||||
{
|
||||
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID(), true);
|
||||
m_geckocode_panel->LoadCodes(m_gameini_default, m_gameini_local, SConfig::GetInstance().GetUniqueID(), true);
|
||||
}
|
||||
|
||||
void wxCheatsWindow::OnEvent_CheatsList_ItemSelected(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
@@ -86,7 +86,7 @@ void AdvancedConfigPane::OnClockOverrideSliderChanged(wxCommandEvent& event)
|
||||
|
||||
void AdvancedConfigPane::UpdateCPUClock()
|
||||
{
|
||||
bool wii = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||
bool wii = SConfig::GetInstance().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)));
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void AudioConfigPane::LoadGUIValues()
|
||||
{
|
||||
PopulateBackendChoiceBox();
|
||||
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& startup_params = SConfig::GetInstance();
|
||||
|
||||
// Audio DSP Engine
|
||||
if (startup_params.bDSPHLE)
|
||||
@@ -120,14 +120,14 @@ void AudioConfigPane::RefreshGUI()
|
||||
|
||||
void AudioConfigPane::OnDSPEngineRadioBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = m_dsp_engine_radiobox->GetSelection() == 0;
|
||||
SConfig::GetInstance().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();
|
||||
SConfig::GetInstance().bDPL2Decoder = m_dpl2_decoder_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void AudioConfigPane::OnVolumeSliderChanged(wxCommandEvent& event)
|
||||
@@ -153,7 +153,7 @@ void AudioConfigPane::OnAudioBackendChanged(wxCommandEvent& event)
|
||||
|
||||
void AudioConfigPane::OnLatencySpinCtrlChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iLatency = m_audio_latency_spinctrl->GetValue();
|
||||
SConfig::GetInstance().iLatency = m_audio_latency_spinctrl->GetValue();
|
||||
}
|
||||
|
||||
void AudioConfigPane::PopulateBackendChoiceBox()
|
||||
|
||||
@@ -129,7 +129,7 @@ void GameCubeConfigPane::InitializeGUI()
|
||||
|
||||
void GameCubeConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& startup_params = SConfig::GetInstance();
|
||||
|
||||
m_system_lang_choice->SetSelection(startup_params.SelectedLanguage);
|
||||
m_skip_bios_checkbox->SetValue(startup_params.bHLE_BS2);
|
||||
@@ -212,21 +212,21 @@ void GameCubeConfigPane::RefreshGUI()
|
||||
|
||||
void GameCubeConfigPane::OnSystemLanguageChange(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.SelectedLanguage = m_system_lang_choice->GetSelection();
|
||||
SConfig::GetInstance().SelectedLanguage = m_system_lang_choice->GetSelection();
|
||||
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnOverrideLanguageCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bOverrideGCLanguage = m_override_lang_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bOverrideGCLanguage = m_override_lang_checkbox->IsChecked();
|
||||
|
||||
AddPendingEvent(wxCommandEvent(wxDOLPHIN_CFG_REFRESH_LIST));
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSkipBiosCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bHLE_BS2 = m_skip_bios_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bHLE_BS2 = m_skip_bios_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GameCubeConfigPane::OnSlotAChanged(wxCommandEvent& event)
|
||||
|
||||
@@ -89,7 +89,7 @@ void GeneralConfigPane::InitializeGUI()
|
||||
|
||||
void GeneralConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& startup_params = SConfig::GetInstance();
|
||||
|
||||
m_dual_core_checkbox->SetValue(startup_params.bCPUThread);
|
||||
m_idle_skip_checkbox->SetValue(startup_params.bSkipIdle);
|
||||
@@ -121,22 +121,22 @@ void GeneralConfigPane::OnDualCoreCheckBoxChanged(wxCommandEvent& event)
|
||||
if (Core::IsRunning())
|
||||
return;
|
||||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = m_dual_core_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bCPUThread = m_dual_core_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnIdleSkipCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = m_idle_skip_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bSkipIdle = m_idle_skip_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnCheatCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats = m_cheats_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bEnableCheats = m_cheats_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnForceNTSCJCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bForceNTSCJ = m_force_ntscj_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bForceNTSCJ = m_force_ntscj_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void GeneralConfigPane::OnFrameLimitChoiceChanged(wxCommandEvent& event)
|
||||
@@ -151,9 +151,9 @@ void GeneralConfigPane::OnCPUEngineRadioBoxChanged(wxCommandEvent& event)
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
|
||||
bool using_interp = (SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore == PowerPC::CORE_INTERPRETER);
|
||||
bool using_interp = (SConfig::GetInstance().iCPUCore == PowerPC::CORE_INTERPRETER);
|
||||
main_frame->g_pCodeWindow->GetMenuBar()->Check(IDM_INTERPRETER, using_interp);
|
||||
}
|
||||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iCPUCore = cpu_cores[selection].CPUid;
|
||||
SConfig::GetInstance().iCPUCore = cpu_cores[selection].CPUid;
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ void InterfaceConfigPane::InitializeGUI()
|
||||
|
||||
void InterfaceConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& startup_params = SConfig::GetInstance();
|
||||
|
||||
m_confirm_stop_checkbox->SetValue(startup_params.bConfirmStop);
|
||||
m_panic_handlers_checkbox->SetValue(startup_params.bUsePanicHandlers);
|
||||
@@ -177,23 +177,23 @@ void InterfaceConfigPane::LoadThemes()
|
||||
m_theme_choice->Append(wxname);
|
||||
}
|
||||
|
||||
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
|
||||
m_theme_choice->SetStringSelection(StrToWxStr(SConfig::GetInstance().theme_name));
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnConfirmStopCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop = m_confirm_stop_checkbox->IsChecked();
|
||||
SConfig::GetInstance().bConfirmStop = m_confirm_stop_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnPanicHandlersCheckBoxChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bUsePanicHandlers = m_panic_handlers_checkbox->IsChecked();
|
||||
SConfig::GetInstance().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();
|
||||
SConfig::GetInstance().bOnScreenDisplayMessages = m_osd_messages_checkbox->IsChecked();
|
||||
}
|
||||
|
||||
void InterfaceConfigPane::OnInterfaceLanguageChoiceChanged(wxCommandEvent& event)
|
||||
@@ -211,7 +211,7 @@ void InterfaceConfigPane::OnPauseOnFocusLostCheckBoxChanged(wxCommandEvent& even
|
||||
|
||||
void InterfaceConfigPane::OnThemeSelected(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name = WxStrToStr(m_theme_choice->GetStringSelection());
|
||||
SConfig::GetInstance().theme_name = WxStrToStr(m_theme_choice->GetStringSelection());
|
||||
|
||||
main_frame->InitBitmaps();
|
||||
main_frame->UpdateGameList();
|
||||
|
||||
@@ -92,7 +92,7 @@ void PathConfigPane::InitializeGUI()
|
||||
|
||||
void PathConfigPane::LoadGUIValues()
|
||||
{
|
||||
const SCoreStartupParameter& startup_params = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
const SConfig& startup_params = SConfig::GetInstance();
|
||||
|
||||
m_recursive_iso_paths_checkbox->SetValue(SConfig::GetInstance().m_RecursiveISOFolder);
|
||||
m_default_iso_filepicker->SetPath(StrToWxStr(startup_params.m_strDefaultISO));
|
||||
@@ -159,17 +159,17 @@ void PathConfigPane::OnRemoveISOPath(wxCommandEvent& event)
|
||||
|
||||
void PathConfigPane::OnDefaultISOChanged(wxCommandEvent& event)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = WxStrToStr(m_default_iso_filepicker->GetPath());
|
||||
SConfig::GetInstance().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());
|
||||
SConfig::GetInstance().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());
|
||||
SConfig::GetInstance().m_strApploader = WxStrToStr(m_apploader_path_filepicker->GetPath());
|
||||
}
|
||||
|
||||
void PathConfigPane::OnNANDRootChanged(wxCommandEvent& event)
|
||||
|
||||
@@ -235,7 +235,7 @@ wxStaticBoxSizer* ControllerConfigDiag::CreateWiimoteConfigSizer()
|
||||
wiimote_configure_bt[i]->Bind(wxEVT_BUTTON, &ControllerConfigDiag::ConfigEmulatedWiimote, this);
|
||||
|
||||
// Disable controller type selection for certain circumstances.
|
||||
bool wii_game_started = SConfig::GetInstance().m_LocalCoreStartupParameter.bWii || Core::GetState() == Core::CORE_UNINITIALIZED;
|
||||
bool wii_game_started = SConfig::GetInstance().bWii || Core::GetState() == Core::CORE_UNINITIALIZED;
|
||||
if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || !wii_game_started)
|
||||
wiimote_source_ch[i]->Disable();
|
||||
|
||||
|
||||
@@ -171,10 +171,10 @@ void CBreakPointWindow::SaveAll()
|
||||
{
|
||||
// simply dump all to bp/mc files in a way we can read again
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
|
||||
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false);
|
||||
ini.SetLines("BreakPoints", PowerPC::breakpoints.GetStrings());
|
||||
ini.SetLines("MemoryChecks", PowerPC::memchecks.GetStrings());
|
||||
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
|
||||
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini");
|
||||
}
|
||||
|
||||
void CBreakPointWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -189,7 +189,7 @@ void CBreakPointWindow::LoadAll()
|
||||
BreakPoints::TBreakPointsStr newbps;
|
||||
MemChecks::TMemChecksStr newmcs;
|
||||
|
||||
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false))
|
||||
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/SymbolDB.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Debugger/Debugger_SymbolMap.h"
|
||||
#include "Core/Debugger/PPCDebugInterface.h"
|
||||
@@ -51,7 +50,7 @@ extern "C" // Bitmaps
|
||||
#include "DolphinWX/resources/toolbar_add_breakpoint.c" // NOLINT
|
||||
}
|
||||
|
||||
CCodeWindow::CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter, CFrame *parent,
|
||||
CCodeWindow::CCodeWindow(const SConfig& _LocalCoreStartupParameter, CFrame *parent,
|
||||
wxWindowID id, const wxPoint& position, const wxSize& size, long style, const wxString& name)
|
||||
: wxPanel(parent, id, position, size, style, name)
|
||||
, Parent(parent)
|
||||
@@ -428,7 +427,7 @@ void CCodeWindow::UpdateCallstack()
|
||||
}
|
||||
|
||||
// Create CPU Mode menus
|
||||
void CCodeWindow::CreateMenu(const SCoreStartupParameter& core_startup_parameter, wxMenuBar *pMenuBar)
|
||||
void CCodeWindow::CreateMenu(const SConfig& core_startup_parameter, wxMenuBar *pMenuBar)
|
||||
{
|
||||
// CPU Mode
|
||||
wxMenu* pCoreMenu = new wxMenu;
|
||||
@@ -552,37 +551,37 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
|
||||
bAutomaticStart = !bAutomaticStart;
|
||||
return;
|
||||
case IDM_JIT_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LS_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStoreOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LSLXZ_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelXzOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStorelXzOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LSLWZ_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelwzOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStorelwzOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LSLBZX_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorelbzxOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStorelbzxOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LSF_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStoreFloatingOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStoreFloatingOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_LSP_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITLoadStorePairedOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITLoadStorePairedOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_FP_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITFloatingPointOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITFloatingPointOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_I_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITIntegerOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITIntegerOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_P_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITPairedOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITPairedOff = event.IsChecked();
|
||||
break;
|
||||
case IDM_JIT_SR_OFF:
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bJITSystemRegistersOff = event.IsChecked();
|
||||
SConfig::GetInstance().bJITSystemRegistersOff = event.IsChecked();
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class CJitWindow;
|
||||
class CCodeView;
|
||||
class DSPDebuggerLLE;
|
||||
class GFXDebuggerPanel;
|
||||
struct SCoreStartupParameter;
|
||||
struct SConfig;
|
||||
|
||||
class wxAuiToolBar;
|
||||
class wxListBox;
|
||||
@@ -32,7 +32,7 @@ class wxToolBar;
|
||||
class CCodeWindow : public wxPanel
|
||||
{
|
||||
public:
|
||||
CCodeWindow(const SCoreStartupParameter& _LocalCoreStartupParameter,
|
||||
CCodeWindow(const SConfig& _LocalCoreStartupParameter,
|
||||
CFrame * parent,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
|
||||
void Update() override;
|
||||
void NotifyMapLoaded();
|
||||
void CreateMenu(const SCoreStartupParameter& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
||||
void CreateMenu(const SConfig& _LocalCoreStartupParameter, wxMenuBar *pMenuBar);
|
||||
void CreateMenuOptions(wxMenu *pMenu);
|
||||
void CreateMenuSymbols(wxMenuBar *pMenuBar);
|
||||
void RecreateToolbar(wxToolBar*);
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "DolphinWX/Debugger/DebuggerPanel.h"
|
||||
#include "VideoCommon/Debugger.h"
|
||||
@@ -269,7 +268,7 @@ void GFXDebuggerPanel::OnPauseAtNextFrameButton(wxCommandEvent& event)
|
||||
void GFXDebuggerPanel::OnDumpButton(wxCommandEvent& event)
|
||||
{
|
||||
std::string dump_path = File::GetUserPath(D_DUMP_IDX) + "Debug/" +
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strUniqueID + "/";
|
||||
SConfig::GetInstance().m_strUniqueID + "/";
|
||||
if (!File::CreateFullPath(dump_path))
|
||||
return;
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Common/SymbolDB.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Debugger/PPCDebugInterface.h"
|
||||
#include "Core/HW/DSP.h"
|
||||
#include "Core/HW/Memmap.h"
|
||||
@@ -92,7 +91,7 @@ CMemoryWindow::CMemoryWindow(wxWindow* parent, wxWindowID id,
|
||||
sizerRight->Add(new wxButton(this, IDM_DUMP_MEMORY, _("Dump MRAM")));
|
||||
sizerRight->Add(new wxButton(this, IDM_DUMP_MEM2, _("Dump EXRAM")));
|
||||
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bMMU)
|
||||
if (!SConfig::GetInstance().bMMU)
|
||||
sizerRight->Add(new wxButton(this, IDM_DUMP_FAKEVMEM, _("Dump FakeVMEM")));
|
||||
|
||||
wxStaticBoxSizer* sizerSearchType = new wxStaticBoxSizer(wxVERTICAL, this, _("Search"));
|
||||
@@ -262,7 +261,7 @@ void CMemoryWindow::OnDumpMemory( wxCommandEvent& event )
|
||||
// Write exram (aram or mem2) to file
|
||||
void CMemoryWindow::OnDumpMem2( wxCommandEvent& event )
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
if (SConfig::GetInstance().bWii)
|
||||
{
|
||||
DumpArray(File::GetUserPath(F_ARAMDUMP_IDX), Memory::m_pEXRAM, Memory::EXRAM_SIZE);
|
||||
}
|
||||
|
||||
@@ -91,9 +91,9 @@ void CWatchWindow::Event_SaveAll(wxCommandEvent& WXUNUSED(event))
|
||||
void CWatchWindow::SaveAll()
|
||||
{
|
||||
IniFile ini;
|
||||
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false);
|
||||
ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false);
|
||||
ini.SetLines("Watches", PowerPC::watches.GetStrings());
|
||||
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini");
|
||||
ini.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini");
|
||||
}
|
||||
|
||||
void CWatchWindow::Event_LoadAll(wxCommandEvent& WXUNUSED(event))
|
||||
@@ -106,7 +106,7 @@ void CWatchWindow::LoadAll()
|
||||
IniFile ini;
|
||||
Watches::TWatchesStr watches;
|
||||
|
||||
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID() + ".ini", false))
|
||||
if (!ini.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + SConfig::GetInstance().GetUniqueID() + ".ini", false))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/HotkeyManager.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/State.h"
|
||||
@@ -147,7 +146,7 @@ bool CRenderFrame::IsValidSavestateDropped(const std::string& filepath)
|
||||
std::string internal_game_id(game_id_length, ' ');
|
||||
file.read(&internal_game_id[0], game_id_length);
|
||||
|
||||
return internal_game_id == SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID();
|
||||
return internal_game_id == SConfig::GetInstance().GetUniqueID();
|
||||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
@@ -160,7 +159,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
|
||||
{
|
||||
case SC_SCREENSAVE:
|
||||
case SC_MONITORPOWER:
|
||||
if (Core::GetState() == Core::CORE_RUN && SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||
if (Core::GetState() == Core::CORE_RUN && SConfig::GetInstance().bDisableScreenSaver)
|
||||
break;
|
||||
default:
|
||||
return wxFrame::MSWWindowProc(nMsg, wParam, lParam);
|
||||
@@ -175,7 +174,7 @@ WXLRESULT CRenderFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPa
|
||||
break;
|
||||
|
||||
case WM_USER_SETCURSOR:
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
||||
if (SConfig::GetInstance().bHideCursor &&
|
||||
main_frame->RendererHasFocus() && Core::GetState() == Core::CORE_RUN)
|
||||
SetCursor(wxCURSOR_BLANK);
|
||||
else
|
||||
@@ -393,7 +392,7 @@ CFrame::CFrame(wxFrame* parent,
|
||||
// Debugger class
|
||||
if (UseDebugger)
|
||||
{
|
||||
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance().m_LocalCoreStartupParameter, this, IDM_CODE_WINDOW);
|
||||
g_pCodeWindow = new CCodeWindow(SConfig::GetInstance(), this, IDM_CODE_WINDOW);
|
||||
LoadIniPerspectives();
|
||||
g_pCodeWindow->Load();
|
||||
}
|
||||
@@ -562,16 +561,16 @@ void CFrame::OnActive(wxActivateEvent& event)
|
||||
{
|
||||
if (event.GetActive() && event.GetEventObject() == m_RenderFrame)
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
if (SConfig::GetInstance().bRenderToMain)
|
||||
m_RenderParent->SetFocus();
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
||||
if (SConfig::GetInstance().bHideCursor &&
|
||||
Core::GetState() == Core::CORE_RUN)
|
||||
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxNullCursor);
|
||||
}
|
||||
}
|
||||
@@ -642,10 +641,10 @@ void CFrame::OnMove(wxMoveEvent& event)
|
||||
event.Skip();
|
||||
|
||||
if (!IsMaximized() &&
|
||||
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()))
|
||||
!(SConfig::GetInstance().bRenderToMain && RendererIsFullscreen()))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX = GetPosition().x;
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY = GetPosition().y;
|
||||
SConfig::GetInstance().iPosX = GetPosition().x;
|
||||
SConfig::GetInstance().iPosY = GetPosition().y;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -654,13 +653,13 @@ void CFrame::OnResize(wxSizeEvent& event)
|
||||
event.Skip();
|
||||
|
||||
if (!IsMaximized() &&
|
||||
!(SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain && RendererIsFullscreen()) &&
|
||||
!(SConfig::GetInstance().bRenderToMain && RendererIsFullscreen()) &&
|
||||
!(Core::GetState() != Core::CORE_UNINITIALIZED &&
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize))
|
||||
SConfig::GetInstance().bRenderToMain &&
|
||||
SConfig::GetInstance().bRenderWindowAutoSize))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth = GetSize().GetWidth();
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight = GetSize().GetHeight();
|
||||
SConfig::GetInstance().iWidth = GetSize().GetWidth();
|
||||
SConfig::GetInstance().iHeight = GetSize().GetHeight();
|
||||
}
|
||||
|
||||
// Make sure the logger pane is a sane size
|
||||
@@ -700,7 +699,7 @@ WXLRESULT CFrame::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam)
|
||||
|
||||
void CFrame::UpdateTitle(const std::string &str)
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
if (SConfig::GetInstance().bRenderToMain &&
|
||||
SConfig::GetInstance().m_InterfaceStatusbar)
|
||||
{
|
||||
GetStatusBar()->SetStatusText(str, 0);
|
||||
@@ -754,7 +753,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
break;
|
||||
|
||||
case WM_USER_CREATE:
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||
break;
|
||||
|
||||
@@ -783,7 +782,7 @@ void CFrame::OnHostMessage(wxCommandEvent& event)
|
||||
void CFrame::OnRenderWindowSizeRequest(int width, int height)
|
||||
{
|
||||
if (!Core::IsRunning() ||
|
||||
!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize ||
|
||||
!SConfig::GetInstance().bRenderWindowAutoSize ||
|
||||
RendererIsFullscreen() || m_RenderFrame->IsMaximized())
|
||||
return;
|
||||
|
||||
@@ -791,7 +790,7 @@ void CFrame::OnRenderWindowSizeRequest(int width, int height)
|
||||
m_RenderFrame->GetClientSize(&old_width, &old_height);
|
||||
|
||||
// Add space for the log/console/debugger window
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
if (SConfig::GetInstance().bRenderToMain &&
|
||||
(SConfig::GetInstance().m_InterfaceLogWindow ||
|
||||
SConfig::GetInstance().m_InterfaceLogConfigWindow) &&
|
||||
!m_Mgr->GetPane("Pane 1").IsFloating())
|
||||
@@ -1134,7 +1133,7 @@ void CFrame::OnFocusChange(wxFocusEvent& event)
|
||||
if (Core::GetState() == Core::CORE_PAUSE)
|
||||
{
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||
}
|
||||
}
|
||||
@@ -1143,7 +1142,7 @@ void CFrame::OnFocusChange(wxFocusEvent& event)
|
||||
if (Core::GetState() == Core::CORE_RUN)
|
||||
{
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxNullCursor);
|
||||
Core::UpdateTitle();
|
||||
}
|
||||
@@ -1189,7 +1188,7 @@ void CFrame::DoFullscreen(bool enable_fullscreen)
|
||||
}
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
if (SConfig::GetInstance().bRenderToMain)
|
||||
{
|
||||
if (enable_fullscreen)
|
||||
{
|
||||
@@ -1341,7 +1340,7 @@ void CFrame::ParseHotkeys()
|
||||
WiimoteId = 4;
|
||||
|
||||
// Actually perform the Wiimote connection or disconnection
|
||||
if (WiimoteId >= 0 && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
if (WiimoteId >= 0 && SConfig::GetInstance().bWii)
|
||||
{
|
||||
wxCommandEvent evt;
|
||||
evt.SetId(IDM_CONNECT_WIIMOTE1 + WiimoteId);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
#include "Core/BootManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/HotkeyManager.h"
|
||||
#include "Core/Movie.h"
|
||||
@@ -369,7 +368,7 @@ wxMenuBar* CFrame::CreateMenu()
|
||||
|
||||
if (g_pCodeWindow)
|
||||
{
|
||||
g_pCodeWindow->CreateMenu(SConfig::GetInstance().m_LocalCoreStartupParameter, menubar);
|
||||
g_pCodeWindow->CreateMenu(SConfig::GetInstance(), menubar);
|
||||
}
|
||||
|
||||
// Help menu
|
||||
@@ -585,7 +584,7 @@ void CFrame::RecreateToolbar()
|
||||
|
||||
void CFrame::InitBitmaps()
|
||||
{
|
||||
auto const dir = StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name));
|
||||
auto const dir = StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name));
|
||||
|
||||
m_Bitmaps[Toolbar_FileOpen ].LoadFile(dir + "open.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmaps[Toolbar_Refresh ].LoadFile(dir + "refresh.png", wxBITMAP_TYPE_PNG);
|
||||
@@ -615,7 +614,7 @@ void CFrame::InitBitmaps()
|
||||
void CFrame::BootGame(const std::string& filename)
|
||||
{
|
||||
std::string bootfile = filename;
|
||||
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
return;
|
||||
@@ -721,7 +720,7 @@ void CFrame::OnTASInput(wxCommandEvent& event)
|
||||
g_TASInputDlg[i]->SetTitle(wxString::Format(_("TAS Input - Controller %d"), i + 1));
|
||||
}
|
||||
|
||||
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU && !(Core::IsRunning() && !SConfig::GetInstance().m_LocalCoreStartupParameter.bWii))
|
||||
if (g_wiimote_sources[i] == WIIMOTE_SRC_EMU && !(Core::IsRunning() && !SConfig::GetInstance().bWii))
|
||||
{
|
||||
g_TASInputDlg[i+4]->CreateWiiLayout(i);
|
||||
g_TASInputDlg[i+4]->Show();
|
||||
@@ -889,8 +888,8 @@ void CFrame::OnRenderParentMove(wxMoveEvent& event)
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED &&
|
||||
!RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized())
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos = m_RenderFrame->GetPosition().x;
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos = m_RenderFrame->GetPosition().y;
|
||||
SConfig::GetInstance().iRenderWindowXPos = m_RenderFrame->GetPosition().x;
|
||||
SConfig::GetInstance().iRenderWindowYPos = m_RenderFrame->GetPosition().y;
|
||||
}
|
||||
event.Skip();
|
||||
}
|
||||
@@ -900,12 +899,12 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
|
||||
if (Core::GetState() != Core::CORE_UNINITIALIZED)
|
||||
{
|
||||
int width, height;
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
if (!SConfig::GetInstance().bRenderToMain &&
|
||||
!RendererIsFullscreen() && !m_RenderFrame->IsMaximized() && !m_RenderFrame->IsIconized())
|
||||
{
|
||||
m_RenderFrame->GetClientSize(&width, &height);
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth = width;
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight = height;
|
||||
SConfig::GetInstance().iRenderWindowWidth = width;
|
||||
SConfig::GetInstance().iRenderWindowHeight = height;
|
||||
}
|
||||
m_LogWindow->Refresh();
|
||||
m_LogWindow->Update();
|
||||
@@ -916,12 +915,12 @@ void CFrame::OnRenderParentResize(wxSizeEvent& event)
|
||||
void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (bFullscreen && SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
|
||||
if (bFullscreen && SConfig::GetInstance().strFullscreenResolution != "Auto")
|
||||
{
|
||||
DEVMODE dmScreenSettings;
|
||||
memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
|
||||
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
|
||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
||||
sscanf(SConfig::GetInstance().strFullscreenResolution.c_str(),
|
||||
"%dx%d", &dmScreenSettings.dmPelsWidth, &dmScreenSettings.dmPelsHeight);
|
||||
dmScreenSettings.dmBitsPerPel = 32;
|
||||
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
|
||||
@@ -935,7 +934,7 @@ void CFrame::ToggleDisplayMode(bool bFullscreen)
|
||||
ChangeDisplaySettings(nullptr, CDS_FULLSCREEN);
|
||||
}
|
||||
#elif defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution != "Auto")
|
||||
if (SConfig::GetInstance().strFullscreenResolution != "Auto")
|
||||
m_XRRConfig->ToggleDisplayMode(bFullscreen);
|
||||
#endif
|
||||
}
|
||||
@@ -951,7 +950,7 @@ void CFrame::StartGame(const std::string& filename)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, false);
|
||||
GetMenuBar()->FindItem(IDM_PLAY)->Enable(false);
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
if (SConfig::GetInstance().bRenderToMain)
|
||||
{
|
||||
// Game has been started, hide the game list
|
||||
m_GameListCtrl->Disable();
|
||||
@@ -959,7 +958,7 @@ void CFrame::StartGame(const std::string& filename)
|
||||
|
||||
m_RenderParent = m_Panel;
|
||||
m_RenderFrame = this;
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop)
|
||||
if (SConfig::GetInstance().bKeepWindowOnTop)
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() | wxSTAY_ON_TOP);
|
||||
else
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
|
||||
@@ -972,8 +971,8 @@ void CFrame::StartGame(const std::string& filename)
|
||||
}
|
||||
else
|
||||
{
|
||||
wxPoint position(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos);
|
||||
wxPoint position(SConfig::GetInstance().iRenderWindowXPos,
|
||||
SConfig::GetInstance().iRenderWindowYPos);
|
||||
#ifdef __APPLE__
|
||||
// On OS X, the render window's title bar is not visible,
|
||||
// and the window therefore not easily moved, when the
|
||||
@@ -982,8 +981,8 @@ void CFrame::StartGame(const std::string& filename)
|
||||
position = wxDefaultPosition;
|
||||
#endif
|
||||
|
||||
wxSize size(SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight);
|
||||
wxSize size(SConfig::GetInstance().iRenderWindowWidth,
|
||||
SConfig::GetInstance().iRenderWindowHeight);
|
||||
#ifdef _WIN32
|
||||
// Out of desktop check
|
||||
int leftPos = GetSystemMetrics(SM_XVIRTUALSCREEN);
|
||||
@@ -994,7 +993,7 @@ void CFrame::StartGame(const std::string& filename)
|
||||
position.x = position.y = wxDefaultCoord;
|
||||
#endif
|
||||
m_RenderFrame = new CRenderFrame((wxFrame*)this, wxID_ANY, _("Dolphin"), position);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop)
|
||||
if (SConfig::GetInstance().bKeepWindowOnTop)
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() | wxSTAY_ON_TOP);
|
||||
else
|
||||
m_RenderFrame->SetWindowStyle(m_RenderFrame->GetWindowStyle() & ~wxSTAY_ON_TOP);
|
||||
@@ -1024,13 +1023,13 @@ void CFrame::StartGame(const std::string& filename)
|
||||
|
||||
wxBeginBusyCursor();
|
||||
|
||||
DoFullscreen(SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen);
|
||||
DoFullscreen(SConfig::GetInstance().bFullscreen);
|
||||
|
||||
if (!BootManager::BootCore(filename))
|
||||
{
|
||||
DoFullscreen(false);
|
||||
// Destroy the renderer frame when not rendering to main
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
if (!SConfig::GetInstance().bRenderToMain)
|
||||
m_RenderFrame->Destroy();
|
||||
m_RenderParent = nullptr;
|
||||
m_bGameLoading = false;
|
||||
@@ -1039,7 +1038,7 @@ void CFrame::StartGame(const std::string& filename)
|
||||
else
|
||||
{
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
X11Utils::XWindowFromHandle(GetHandle()), true);
|
||||
#endif
|
||||
@@ -1094,14 +1093,14 @@ void CFrame::DoPause()
|
||||
if (Core::GetState() == Core::CORE_RUN)
|
||||
{
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxNullCursor);
|
||||
Core::UpdateTitle();
|
||||
}
|
||||
else
|
||||
{
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
||||
if (SConfig::GetInstance().bHideCursor &&
|
||||
RendererHasFocus())
|
||||
m_RenderParent->SetCursor(wxCURSOR_BLANK);
|
||||
}
|
||||
@@ -1129,7 +1128,7 @@ void CFrame::DoStop()
|
||||
wxMutexGuiEnter();
|
||||
#endif
|
||||
// Ask for confirmation in case the user accidentally clicked Stop / Escape
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bConfirmStop)
|
||||
if (SConfig::GetInstance().bConfirmStop)
|
||||
{
|
||||
// Exit fullscreen to ensure it does not cover the stop dialog.
|
||||
DoFullscreen(false);
|
||||
@@ -1140,7 +1139,7 @@ void CFrame::DoStop()
|
||||
// If exclusive fullscreen is not enabled then we can pause the emulation
|
||||
// before we've exited fullscreen. If not then we need to exit fullscreen first.
|
||||
if (!RendererIsFullscreen() || !g_Config.ExclusiveFullscreenEnabled() ||
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
SConfig::GetInstance().bRenderToMain)
|
||||
{
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
}
|
||||
@@ -1198,7 +1197,7 @@ void CFrame::OnStopped()
|
||||
m_confirmStop = false;
|
||||
|
||||
#if defined(HAVE_X11) && HAVE_X11
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||
X11Utils::InhibitScreensaver(X11Utils::XDisplayFromHandle(GetHandle()),
|
||||
X11Utils::XWindowFromHandle(GetHandle()), false);
|
||||
#endif
|
||||
@@ -1213,10 +1212,10 @@ void CFrame::OnStopped()
|
||||
wxTheApp->Unbind(wxEVT_MIDDLE_DOWN, &CFrame::OnMouse, this);
|
||||
wxTheApp->Unbind(wxEVT_MIDDLE_UP, &CFrame::OnMouse, this);
|
||||
wxTheApp->Unbind(wxEVT_MOTION, &CFrame::OnMouse, this);
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
m_RenderParent->SetCursor(wxNullCursor);
|
||||
DoFullscreen(false);
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain)
|
||||
if (!SConfig::GetInstance().bRenderToMain)
|
||||
{
|
||||
m_RenderFrame->Destroy();
|
||||
}
|
||||
@@ -1246,10 +1245,10 @@ void CFrame::OnStopped()
|
||||
Close(true);
|
||||
|
||||
// If using auto size with render to main, reset the application size.
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain &&
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize)
|
||||
SetSize(SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight);
|
||||
if (SConfig::GetInstance().bRenderToMain &&
|
||||
SConfig::GetInstance().bRenderWindowAutoSize)
|
||||
SetSize(SConfig::GetInstance().iWidth,
|
||||
SConfig::GetInstance().iHeight);
|
||||
|
||||
m_GameListCtrl->Enable();
|
||||
m_GameListCtrl->Show();
|
||||
@@ -1541,7 +1540,7 @@ void CFrame::OnFifoPlayer(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
void CFrame::ConnectWiimote(int wm_idx, bool connect)
|
||||
{
|
||||
if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
if (Core::IsRunning() && SConfig::GetInstance().bWii)
|
||||
{
|
||||
bool was_unpaused = Core::PauseAndLock(true);
|
||||
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
|
||||
@@ -1569,13 +1568,13 @@ void CFrame::OnToggleFullscreen(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
void CFrame::OnToggleDualCore(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread = !SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread;
|
||||
SConfig::GetInstance().bCPUThread = !SConfig::GetInstance().bCPUThread;
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
|
||||
void CFrame::OnToggleSkipIdle(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle = !SConfig::GetInstance().m_LocalCoreStartupParameter.bSkipIdle;
|
||||
SConfig::GetInstance().bSkipIdle = !SConfig::GetInstance().bSkipIdle;
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
|
||||
@@ -1699,7 +1698,7 @@ void CFrame::UpdateGUI()
|
||||
bool Running = Core::GetState() == Core::CORE_RUN;
|
||||
bool Paused = Core::GetState() == Core::CORE_PAUSE;
|
||||
bool Stopping = Core::GetState() == Core::CORE_STOPPING;
|
||||
bool RunningWii = Initialized && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii;
|
||||
bool RunningWii = Initialized && SConfig::GetInstance().bWii;
|
||||
|
||||
// Make sure that we have a toolbar
|
||||
if (m_ToolBar)
|
||||
@@ -1746,7 +1745,7 @@ void CFrame::UpdateGUI()
|
||||
GetMenuBar()->FindItem(IDM_LOAD_WII_MENU)->Enable(!Initialized);
|
||||
|
||||
// Tools
|
||||
GetMenuBar()->FindItem(IDM_CHEATS)->Enable(SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats);
|
||||
GetMenuBar()->FindItem(IDM_CHEATS)->Enable(SConfig::GetInstance().bEnableCheats);
|
||||
|
||||
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE1)->Enable(RunningWii);
|
||||
GetMenuBar()->FindItem(IDM_CONNECT_WIIMOTE2)->Enable(RunningWii);
|
||||
@@ -1798,7 +1797,7 @@ void CFrame::UpdateGUI()
|
||||
if (m_GameListCtrl->IsEnabled())
|
||||
{
|
||||
// Prepare to load Default ISO, enable play button
|
||||
if (!SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO.empty())
|
||||
if (!SConfig::GetInstance().m_strDefaultISO.empty())
|
||||
{
|
||||
if (m_ToolBar)
|
||||
m_ToolBar->EnableTool(IDM_PLAY, true);
|
||||
@@ -1866,7 +1865,7 @@ void CFrame::UpdateGUI()
|
||||
// Update non-modal windows
|
||||
if (g_CheatsWindow)
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bEnableCheats)
|
||||
if (SConfig::GetInstance().bEnableCheats)
|
||||
g_CheatsWindow->UpdateGUI();
|
||||
else
|
||||
g_CheatsWindow->Close();
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
#include "Core/HW/DVDInterface.h"
|
||||
@@ -85,8 +84,8 @@ static int CompareGameListItems(const GameListItem* iso1, const GameListItem* is
|
||||
sortData = -sortData;
|
||||
}
|
||||
|
||||
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso1->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(iso2->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOne = SConfig::GetInstance().GetCurrentLanguage(iso1->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
DiscIO::IVolume::ELanguage languageOther = SConfig::GetInstance().GetCurrentLanguage(iso2->GetPlatform() != DiscIO::IVolume::GAMECUBE_DISC);
|
||||
|
||||
switch (sortData)
|
||||
{
|
||||
@@ -411,7 +410,7 @@ void CGameListCtrl::InsertItemInReportView(long _Index)
|
||||
}
|
||||
|
||||
std::string title;
|
||||
IniFile gameini = SCoreStartupParameter::LoadGameIni(rISOFile.GetUniqueID(), rISOFile.GetRevision());
|
||||
IniFile gameini = SConfig::LoadGameIni(rISOFile.GetUniqueID(), rISOFile.GetRevision());
|
||||
if (gameini.GetIfExists("EmuState", "Title", &title))
|
||||
name = title;
|
||||
|
||||
@@ -851,8 +850,7 @@ void CGameListCtrl::OnRightClick(wxMouseEvent& event)
|
||||
popupMenu.AppendCheckItem(IDM_SET_DEFAULT_ISO, _("Set as &default ISO"));
|
||||
|
||||
// First we have to decide a starting value when we append it
|
||||
if (selected_iso->GetFileName() == SConfig::GetInstance().
|
||||
m_LocalCoreStartupParameter.m_strDefaultISO)
|
||||
if (selected_iso->GetFileName() == SConfig::GetInstance().m_strDefaultISO)
|
||||
popupMenu.FindItem(IDM_SET_DEFAULT_ISO)->Check();
|
||||
|
||||
popupMenu.AppendSeparator();
|
||||
@@ -967,14 +965,14 @@ void CGameListCtrl::OnSetDefaultISO(wxCommandEvent& event)
|
||||
if (event.IsChecked())
|
||||
{
|
||||
// Write the new default value and save it the ini file
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO =
|
||||
SConfig::GetInstance().m_strDefaultISO =
|
||||
iso->GetFileName();
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Otherwise blank the value and save it
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strDefaultISO = "";
|
||||
SConfig::GetInstance().m_strDefaultISO = "";
|
||||
SConfig::GetInstance().SaveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
|
||||
#include "DiscIO/CompressedBlob.h"
|
||||
@@ -124,7 +123,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||
|
||||
if (IsValid())
|
||||
{
|
||||
IniFile ini = SCoreStartupParameter::LoadGameIni(m_UniqueID, m_Revision);
|
||||
IniFile ini = SConfig::LoadGameIni(m_UniqueID, m_Revision);
|
||||
ini.GetIfExists("EmuState", "EmulationStateId", &m_emu_state);
|
||||
ini.GetIfExists("EmuState", "EmulationIssues", &m_issues);
|
||||
}
|
||||
@@ -145,7 +144,7 @@ GameListItem::GameListItem(const std::string& _rFileName)
|
||||
else
|
||||
{
|
||||
// default banner
|
||||
m_Bitmap.LoadFile(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().m_LocalCoreStartupParameter.theme_name)) + "nobanner.png", wxBITMAP_TYPE_PNG);
|
||||
m_Bitmap.LoadFile(StrToWxStr(File::GetThemeDir(SConfig::GetInstance().theme_name)) + "nobanner.png", wxBITMAP_TYPE_PNG);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,7 +214,7 @@ std::string GameListItem::GetDescription(DiscIO::IVolume::ELanguage language) co
|
||||
std::string GameListItem::GetDescription() const
|
||||
{
|
||||
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
return GetDescription(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
|
||||
return GetDescription(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
}
|
||||
|
||||
std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
|
||||
@@ -226,7 +225,7 @@ std::string GameListItem::GetName(DiscIO::IVolume::ELanguage language) const
|
||||
std::string GameListItem::GetName() const
|
||||
{
|
||||
bool wii = m_Platform != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
std::string name = GetName(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
|
||||
std::string name = GetName(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
if (name.empty())
|
||||
{
|
||||
// No usable name, return filename (better than nothing)
|
||||
|
||||
@@ -54,7 +54,6 @@
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ActionReplay.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/GeckoCodeConfig.h"
|
||||
#include "Core/PatchEngine.h"
|
||||
#include "Core/Boot/Boot.h"
|
||||
@@ -119,8 +118,8 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
|
||||
// Load game INIs
|
||||
GameIniFileLocal = File::GetUserPath(D_GAMESETTINGS_IDX) + game_id + ".ini";
|
||||
GameIniDefault = SCoreStartupParameter::LoadDefaultGameIni(game_id, OpenISO->GetRevision());
|
||||
GameIniLocal = SCoreStartupParameter::LoadLocalGameIni(game_id, OpenISO->GetRevision());
|
||||
GameIniDefault = SConfig::LoadDefaultGameIni(game_id, OpenISO->GetRevision());
|
||||
GameIniLocal = SConfig::LoadLocalGameIni(game_id, OpenISO->GetRevision());
|
||||
|
||||
// Setup GUI
|
||||
OpenGameListItem = new GameListItem(fileName);
|
||||
@@ -190,7 +189,7 @@ CISOProperties::CISOProperties(const std::string fileName, wxWindow* parent, wxW
|
||||
|
||||
// Here we set all the info to be shown + we set the window title
|
||||
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
ChangeBannerDetails(SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii));
|
||||
ChangeBannerDetails(SConfig::GetInstance().GetCurrentLanguage(wii));
|
||||
|
||||
m_Banner->SetBitmap(OpenGameListItem->GetBitmap());
|
||||
m_Banner->Bind(wxEVT_RIGHT_DOWN, &CISOProperties::RightClickOnBanner, this);
|
||||
@@ -490,7 +489,7 @@ void CISOProperties::CreateGUIControls()
|
||||
wxStaticText* const m_LangText = new wxStaticText(m_Information, wxID_ANY, _("Show Language:"));
|
||||
|
||||
bool wii = OpenISO->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(wii);
|
||||
DiscIO::IVolume::ELanguage preferred_language = SConfig::GetInstance().GetCurrentLanguage(wii);
|
||||
|
||||
std::vector<DiscIO::IVolume::ELanguage> languages = OpenGameListItem->GetLanguages();
|
||||
int preferred_language_index = 0;
|
||||
@@ -628,7 +627,7 @@ void CISOProperties::CreateGUIControls()
|
||||
|
||||
// If there is no default gameini, disable the button.
|
||||
bool game_ini_exists = false;
|
||||
for (const std::string& ini_filename : SCoreStartupParameter::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
|
||||
for (const std::string& ini_filename : SConfig::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
|
||||
{
|
||||
if (File::Exists(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + ini_filename))
|
||||
{
|
||||
@@ -1283,7 +1282,7 @@ void CISOProperties::OnComputeMD5Sum(wxCommandEvent& WXUNUSED (event))
|
||||
// they will all be opened, but there is usually only one
|
||||
void CISOProperties::OnShowDefaultConfig(wxCommandEvent& WXUNUSED (event))
|
||||
{
|
||||
for (const std::string& filename : SCoreStartupParameter::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
|
||||
for (const std::string& filename : SConfig::GetGameIniFilenames(game_id, OpenISO->GetRevision()))
|
||||
{
|
||||
std::string path = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename;
|
||||
if (File::Exists(path))
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/Movie.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
@@ -210,31 +209,31 @@ bool DolphinApp::OnInit()
|
||||
|
||||
if (selectPerfDir)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_perfDir =
|
||||
SConfig::GetInstance().m_perfDir =
|
||||
WxStrToStr(perfDir);
|
||||
}
|
||||
|
||||
if (selectVideoBackend && videoBackendName != wxEmptyString)
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend =
|
||||
SConfig::GetInstance().m_strVideoBackend =
|
||||
WxStrToStr(videoBackendName);
|
||||
|
||||
if (selectAudioEmulation)
|
||||
{
|
||||
if (audioEmulationName == "HLE")
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = true;
|
||||
SConfig::GetInstance().bDSPHLE = true;
|
||||
else if (audioEmulationName == "LLE")
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bDSPHLE = false;
|
||||
SConfig::GetInstance().bDSPHLE = false;
|
||||
}
|
||||
|
||||
VideoBackend::ActivateBackend(SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend);
|
||||
VideoBackend::ActivateBackend(SConfig::GetInstance().m_strVideoBackend);
|
||||
|
||||
// Enable the PNG image handler for screenshots
|
||||
wxImage::AddHandler(new wxPNGHandler);
|
||||
|
||||
int x = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosX;
|
||||
int y = SConfig::GetInstance().m_LocalCoreStartupParameter.iPosY;
|
||||
int w = SConfig::GetInstance().m_LocalCoreStartupParameter.iWidth;
|
||||
int h = SConfig::GetInstance().m_LocalCoreStartupParameter.iHeight;
|
||||
int x = SConfig::GetInstance().iPosX;
|
||||
int y = SConfig::GetInstance().iPosY;
|
||||
int w = SConfig::GetInstance().iWidth;
|
||||
int h = SConfig::GetInstance().iHeight;
|
||||
|
||||
if (File::Exists("www.dolphin-emulator.com.txt"))
|
||||
{
|
||||
@@ -479,7 +478,7 @@ void Host_RequestFullscreen(bool enable_fullscreen)
|
||||
|
||||
void Host_SetStartupDebuggingParameters()
|
||||
{
|
||||
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
if (main_frame->g_pCodeWindow)
|
||||
{
|
||||
StartUp.bBootToPause = main_frame->g_pCodeWindow->BootToPause();
|
||||
|
||||
@@ -226,7 +226,7 @@ static std::string GetTitle(std::string filename)
|
||||
|
||||
/*
|
||||
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(is_wii_title);
|
||||
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
||||
|
||||
auto it = titles.find(language);
|
||||
if (it != end)
|
||||
@@ -267,7 +267,7 @@ static std::string GetDescription(std::string filename)
|
||||
|
||||
/*
|
||||
bool is_wii_title = pVolume->GetVolumeType() != DiscIO::IVolume::GAMECUBE_DISC;
|
||||
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().m_LocalCoreStartupParameter.GetCurrentLanguage(is_wii_title);
|
||||
DiscIO::IVolume::ELanguage language = SConfig::GetInstance().GetCurrentLanguage(is_wii_title);
|
||||
|
||||
auto it = descriptions.find(language);
|
||||
if (it != end)
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "Core/BootManager.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/Host.h"
|
||||
#include "Core/State.h"
|
||||
#include "Core/HW/Wiimote.h"
|
||||
@@ -77,7 +76,7 @@ void Host_RequestFullscreen(bool enable_fullscreen) {}
|
||||
|
||||
void Host_SetStartupDebuggingParameters()
|
||||
{
|
||||
SCoreStartupParameter& StartUp = SConfig::GetInstance().m_LocalCoreStartupParameter;
|
||||
SConfig& StartUp = SConfig::GetInstance();
|
||||
StartUp.bEnableDebugging = false;
|
||||
StartUp.bBootToPause = false;
|
||||
}
|
||||
@@ -99,7 +98,7 @@ bool Host_RendererIsFullscreen()
|
||||
|
||||
void Host_ConnectWiimote(int wm_idx, bool connect)
|
||||
{
|
||||
if (Core::IsRunning() && SConfig::GetInstance().m_LocalCoreStartupParameter.bWii)
|
||||
if (Core::IsRunning() && SConfig::GetInstance().bWii)
|
||||
{
|
||||
bool was_unpaused = Core::PauseAndLock(true);
|
||||
GetUsbPointer()->AccessWiiMote(wm_idx | 0x100)->Activate(connect);
|
||||
@@ -136,10 +135,10 @@ class PlatformX11 : public Platform
|
||||
}
|
||||
|
||||
win = XCreateSimpleWindow(dpy, DefaultRootWindow(dpy),
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight,
|
||||
SConfig::GetInstance().iRenderWindowXPos,
|
||||
SConfig::GetInstance().iRenderWindowYPos,
|
||||
SConfig::GetInstance().iRenderWindowWidth,
|
||||
SConfig::GetInstance().iRenderWindowHeight,
|
||||
0, 0, BlackPixel(dpy, 0));
|
||||
XSelectInput(dpy, win, KeyPressMask | FocusChangeMask);
|
||||
Atom wmProtocols[1];
|
||||
@@ -149,14 +148,14 @@ class PlatformX11 : public Platform
|
||||
XFlush(dpy);
|
||||
s_window_handle = (void*)win;
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bDisableScreenSaver)
|
||||
if (SConfig::GetInstance().bDisableScreenSaver)
|
||||
X11Utils::InhibitScreensaver(dpy, win, true);
|
||||
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
XRRConfig = new X11Utils::XRRConfiguration(dpy, win);
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
{
|
||||
// make a blank cursor
|
||||
Pixmap Blank;
|
||||
@@ -176,7 +175,7 @@ class PlatformX11 : public Platform
|
||||
|
||||
void MainLoop() override
|
||||
{
|
||||
bool fullscreen = SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen;
|
||||
bool fullscreen = SConfig::GetInstance().bFullscreen;
|
||||
|
||||
if (fullscreen)
|
||||
{
|
||||
@@ -202,13 +201,13 @@ class PlatformX11 : public Platform
|
||||
{
|
||||
if (Core::GetState() == Core::CORE_RUN)
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
XUndefineCursor(dpy, win);
|
||||
Core::SetState(Core::CORE_PAUSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
XDefineCursor(dpy, win, blankCursor);
|
||||
Core::SetState(Core::CORE_RUN);
|
||||
}
|
||||
@@ -243,13 +242,13 @@ class PlatformX11 : public Platform
|
||||
break;
|
||||
case FocusIn:
|
||||
rendererHasFocus = true;
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor &&
|
||||
if (SConfig::GetInstance().bHideCursor &&
|
||||
Core::GetState() != Core::CORE_PAUSE)
|
||||
XDefineCursor(dpy, win, blankCursor);
|
||||
break;
|
||||
case FocusOut:
|
||||
rendererHasFocus = false;
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
XUndefineCursor(dpy, win);
|
||||
break;
|
||||
case ClientMessage:
|
||||
@@ -263,10 +262,10 @@ class PlatformX11 : public Platform
|
||||
Window winDummy;
|
||||
unsigned int borderDummy, depthDummy;
|
||||
XGetGeometry(dpy, win, &winDummy,
|
||||
&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowXPos,
|
||||
&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowYPos,
|
||||
(unsigned int *)&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowWidth,
|
||||
(unsigned int *)&SConfig::GetInstance().m_LocalCoreStartupParameter.iRenderWindowHeight,
|
||||
&SConfig::GetInstance().iRenderWindowXPos,
|
||||
&SConfig::GetInstance().iRenderWindowYPos,
|
||||
(unsigned int *)&SConfig::GetInstance().iRenderWindowWidth,
|
||||
(unsigned int *)&SConfig::GetInstance().iRenderWindowHeight,
|
||||
&borderDummy, &depthDummy);
|
||||
rendererIsFullscreen = false;
|
||||
}
|
||||
@@ -280,7 +279,7 @@ class PlatformX11 : public Platform
|
||||
delete XRRConfig;
|
||||
#endif
|
||||
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor)
|
||||
if (SConfig::GetInstance().bHideCursor)
|
||||
XFreeCursor(dpy, blankCursor);
|
||||
|
||||
XCloseDisplay(dpy);
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#include "Common/IniFile.h"
|
||||
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "Core/NetPlayClient.h"
|
||||
#include "Core/NetPlayProto.h"
|
||||
#include "Core/NetPlayServer.h"
|
||||
@@ -251,9 +250,9 @@ void NetPlayDialog::OnChat(wxCommandEvent&)
|
||||
void NetPlayDialog::GetNetSettings(NetSettings &settings)
|
||||
{
|
||||
SConfig &instance = SConfig::GetInstance();
|
||||
settings.m_CPUthread = instance.m_LocalCoreStartupParameter.bCPUThread;
|
||||
settings.m_CPUcore = instance.m_LocalCoreStartupParameter.iCPUCore;
|
||||
settings.m_DSPHLE = instance.m_LocalCoreStartupParameter.bDSPHLE;
|
||||
settings.m_CPUthread = instance.bCPUThread;
|
||||
settings.m_CPUcore = instance.iCPUCore;
|
||||
settings.m_DSPHLE = instance.bDSPHLE;
|
||||
settings.m_DSPEnableJIT = instance.m_DSPEnableJIT;
|
||||
settings.m_WriteToMemcard = m_memcard_write->GetValue();
|
||||
settings.m_OCEnable = instance.m_OCEnable;
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
Close();
|
||||
|
||||
g_video_backend = new_backend;
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
|
||||
SConfig::GetInstance().m_strVideoBackend = g_video_backend->GetName();
|
||||
|
||||
g_video_backend->ShowConfig(GetParent());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "DolphinWX/Frame.h"
|
||||
#include "DolphinWX/Main.h"
|
||||
#include "DolphinWX/VideoConfigDiag.h"
|
||||
@@ -282,7 +281,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
RegisterControl(choice_display_resolution, wxGetTranslation(display_res_desc));
|
||||
choice_display_resolution->Bind(wxEVT_CHOICE, &VideoConfigDiag::Event_DisplayResolution, this);
|
||||
|
||||
choice_display_resolution->SetStringSelection(StrToWxStr(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution));
|
||||
choice_display_resolution->SetStringSelection(StrToWxStr(SConfig::GetInstance().strFullscreenResolution));
|
||||
|
||||
szr_display->Add(label_display_resolution, 1, wxALIGN_CENTER_VERTICAL, 0);
|
||||
szr_display->Add(choice_display_resolution);
|
||||
@@ -302,7 +301,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
// various other display options
|
||||
{
|
||||
szr_display->Add(CreateCheckBox(page_general, _("V-Sync"), wxGetTranslation(vsync_desc), vconfig.bVSync));
|
||||
szr_display->Add(CreateCheckBox(page_general, _("Use Fullscreen"), wxGetTranslation(use_fullscreen_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bFullscreen));
|
||||
szr_display->Add(CreateCheckBox(page_general, _("Use Fullscreen"), wxGetTranslation(use_fullscreen_desc), SConfig::GetInstance().bFullscreen));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -312,10 +311,10 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
{
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Show FPS"), wxGetTranslation(show_fps_desc), vconfig.bShowFPS));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Log Render Time to File"), wxGetTranslation(log_render_time_to_file_desc), vconfig.bLogRenderTimeToFile));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Auto adjust Window Size"), wxGetTranslation(auto_window_size_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderWindowAutoSize));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Keep Window on Top"), wxGetTranslation(keep_window_on_top_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bKeepWindowOnTop));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Hide Mouse Cursor"), wxGetTranslation(hide_mouse_cursor_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bHideCursor));
|
||||
szr_other->Add(render_to_main_checkbox = CreateCheckBox(page_general, _("Render to Main Window"), wxGetTranslation(render_to_main_win_desc), SConfig::GetInstance().m_LocalCoreStartupParameter.bRenderToMain));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Auto adjust Window Size"), wxGetTranslation(auto_window_size_desc), SConfig::GetInstance().bRenderWindowAutoSize));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Keep Window on Top"), wxGetTranslation(keep_window_on_top_desc), SConfig::GetInstance().bKeepWindowOnTop));
|
||||
szr_other->Add(CreateCheckBox(page_general, _("Hide Mouse Cursor"), wxGetTranslation(hide_mouse_cursor_desc), SConfig::GetInstance().bHideCursor));
|
||||
szr_other->Add(render_to_main_checkbox = CreateCheckBox(page_general, _("Render to Main Window"), wxGetTranslation(render_to_main_win_desc), SConfig::GetInstance().bRenderToMain));
|
||||
}
|
||||
|
||||
|
||||
@@ -583,9 +582,9 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
RegisterControl(progressive_scan_checkbox, wxGetTranslation(prog_scan_desc));
|
||||
progressive_scan_checkbox->Bind(wxEVT_CHECKBOX, &VideoConfigDiag::Event_ProgressiveScan, this);
|
||||
|
||||
progressive_scan_checkbox->SetValue(SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive);
|
||||
progressive_scan_checkbox->SetValue(SConfig::GetInstance().bProgressive);
|
||||
// A bit strange behavior, but this needs to stay in sync with the main progressive boolean; TODO: Is this still necessary?
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive);
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", SConfig::GetInstance().bProgressive);
|
||||
|
||||
szr_misc->Add(progressive_scan_checkbox);
|
||||
}
|
||||
@@ -624,7 +623,7 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
||||
|
||||
void VideoConfigDiag::Event_DisplayResolution(wxCommandEvent &ev)
|
||||
{
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution =
|
||||
SConfig::GetInstance().strFullscreenResolution =
|
||||
WxStrToStr(choice_display_resolution->GetStringSelection());
|
||||
#if defined(HAVE_XRANDR) && HAVE_XRANDR
|
||||
main_frame->m_XRRConfig->Update();
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
#include "Common/SysConf.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "DolphinWX/PostProcessingConfigDiag.h"
|
||||
#include "DolphinWX/WxUtils.h"
|
||||
#include "VideoCommon/PostProcessing.h"
|
||||
@@ -103,7 +102,7 @@ protected:
|
||||
Close();
|
||||
|
||||
g_video_backend = new_backend;
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.m_strVideoBackend = g_video_backend->GetName();
|
||||
SConfig::GetInstance().m_strVideoBackend = g_video_backend->GetName();
|
||||
|
||||
g_video_backend->ShowConfig(GetParent());
|
||||
}
|
||||
@@ -123,7 +122,7 @@ protected:
|
||||
void Event_ProgressiveScan(wxCommandEvent &ev)
|
||||
{
|
||||
SConfig::GetInstance().m_SYSCONF->SetData("IPL.PGS", ev.GetInt());
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.bProgressive = ev.IsChecked();
|
||||
SConfig::GetInstance().bProgressive = ev.IsChecked();
|
||||
|
||||
ev.Skip();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/CoreParameter.h"
|
||||
#include "DolphinWX/X11Utils.h"
|
||||
|
||||
extern char **environ;
|
||||
@@ -112,7 +111,7 @@ XRRConfiguration::~XRRConfiguration()
|
||||
|
||||
void XRRConfiguration::Update()
|
||||
{
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution == "Auto")
|
||||
if (SConfig::GetInstance().strFullscreenResolution == "Auto")
|
||||
return;
|
||||
|
||||
if (!bValid)
|
||||
@@ -134,7 +133,7 @@ void XRRConfiguration::Update()
|
||||
unsigned int fullWidth, fullHeight;
|
||||
char *output_name = nullptr;
|
||||
char auxFlag = '\0';
|
||||
if (SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.find(':') ==
|
||||
if (SConfig::GetInstance().strFullscreenResolution.find(':') ==
|
||||
std::string::npos)
|
||||
{
|
||||
fullWidth = fb_width;
|
||||
@@ -142,7 +141,7 @@ void XRRConfiguration::Update()
|
||||
}
|
||||
else
|
||||
{
|
||||
sscanf(SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution.c_str(),
|
||||
sscanf(SConfig::GetInstance().strFullscreenResolution.c_str(),
|
||||
"%m[^:]: %ux%u%c", &output_name, &fullWidth, &fullHeight, &auxFlag);
|
||||
}
|
||||
bool want_interlaced = ('i' == auxFlag);
|
||||
@@ -161,7 +160,7 @@ void XRRConfiguration::Update()
|
||||
if (!output_name)
|
||||
{
|
||||
output_name = strdup(output_info->name);
|
||||
SConfig::GetInstance().m_LocalCoreStartupParameter.strFullscreenResolution =
|
||||
SConfig::GetInstance().strFullscreenResolution =
|
||||
StringFromFormat("%s: %ux%u", output_info->name, fullWidth, fullHeight);
|
||||
}
|
||||
outputInfo = output_info;
|
||||
|
||||
Reference in New Issue
Block a user