2013-04-17 22:43:11 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 22:43:11 -04:00
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "Common/CommonPaths.h"
|
2014-09-07 20:06:58 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "Common/FileUtil.h"
|
|
|
|
#include "Common/IniFile.h"
|
|
|
|
#include "Core/ConfigManager.h"
|
|
|
|
#include "Core/HW/SI.h"
|
2015-02-19 10:29:21 -05:00
|
|
|
#include "Core/PowerPC/PowerPC.h"
|
2014-02-19 13:09:14 -05:00
|
|
|
#include "DiscIO/NANDContentLoader.h"
|
2009-02-28 23:21:51 +00:00
|
|
|
|
2010-02-19 18:50:01 +00:00
|
|
|
SConfig* SConfig::m_Instance;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2013-10-19 18:58:02 -04:00
|
|
|
static const struct
|
|
|
|
{
|
|
|
|
const char* IniText;
|
|
|
|
const int DefaultKey;
|
|
|
|
const int DefaultModifier;
|
2010-04-25 20:10:16 +00:00
|
|
|
} g_HKData[] = {
|
2015-02-01 10:07:22 +01:00
|
|
|
{ "Open", 79 /* 'O' */, 2 /* wxMOD_CONTROL */ },
|
|
|
|
{ "ChangeDisc", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "RefreshList", 0, 0 /* wxMOD_NONE */ },
|
2014-09-12 17:15:46 -07:00
|
|
|
#ifdef __APPLE__
|
2015-02-01 10:07:22 +01:00
|
|
|
{ "PlayPause", 80 /* 'P' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Stop", 87 /* 'W' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ExportRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "ToggleFullscreen", 70 /* 'F' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Screenshot", 83 /* 'S' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "Wiimote1Connect", 49 /* '1' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Wiimote2Connect", 50 /* '2' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Wiimote3Connect", 51 /* '3' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "Wiimote4Connect", 52 /* '4' */, 2 /* wxMOD_CMD */ },
|
|
|
|
{ "BalanceBoardConnect", 53 /* '4' */, 2 /* wxMOD_CMD */ },
|
2011-01-12 01:03:49 +00:00
|
|
|
#else
|
2015-02-01 10:07:22 +01:00
|
|
|
{ "PlayPause", 349 /* WXK_F10 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "Stop", 27 /* WXK_ESCAPE */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "Reset", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "FrameAdvance", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "StartRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "PlayRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ExportRecording", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "Readonlymode", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 1 /* wxMOD_ALT */ },
|
|
|
|
{ "Screenshot", 348 /* WXK_F9 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "Exit", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "Wiimote1Connect", 344 /* WXK_F5 */, 1 /* wxMOD_ALT */ },
|
|
|
|
{ "Wiimote2Connect", 345 /* WXK_F6 */, 1 /* wxMOD_ALT */ },
|
|
|
|
{ "Wiimote3Connect", 346 /* WXK_F7 */, 1 /* wxMOD_ALT */ },
|
|
|
|
{ "Wiimote4Connect", 347 /* WXK_F8 */, 1 /* wxMOD_ALT */ },
|
|
|
|
{ "BalanceBoardConnect", 348 /* WXK_F9 */, 1 /* wxMOD_ALT */ },
|
2011-01-12 01:03:49 +00:00
|
|
|
#endif
|
2014-12-28 22:03:21 +01:00
|
|
|
|
2015-02-01 10:07:22 +01:00
|
|
|
{ "VolumeDown", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "VolumeUp", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "VolumeToggleMute", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
2015-05-10 02:02:47 +02:00
|
|
|
{ "IncreaseIR", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "DecreaseIR", 0, 0 /* wxMOD_NONE */ },
|
2015-02-01 10:07:22 +01:00
|
|
|
|
|
|
|
{ "ToggleIR", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ToggleFog", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "ToggleThrottle", 9 /* '\t' */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "DecreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "IncreaseFrameLimit", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "FreelookDecreaseSpeed", 49 /* '1' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookIncreaseSpeed", 50 /* '2' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookResetSpeed", 70 /* 'F' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookUp", 69 /* 'E' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookDown", 81 /* 'Q' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookLeft", 65 /* 'A' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookRight", 68 /* 'D' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookZoomIn", 87 /* 'W' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookZoomOut", 83 /* 'S' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "FreelookReset", 82 /* 'R' */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
|
|
|
|
{ "DecreaseDepth", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "IncreaseDepth", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "DecreaseConvergence", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "IncreaseConvergence", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "LoadStateSlot1", 340 /* WXK_F1 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot2", 341 /* WXK_F2 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot3", 342 /* WXK_F3 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot4", 343 /* WXK_F4 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot5", 344 /* WXK_F5 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot6", 345 /* WXK_F6 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot7", 346 /* WXK_F7 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot8", 347 /* WXK_F8 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateSlot10", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "SaveStateSlot1", 340 /* WXK_F1 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot2", 341 /* WXK_F2 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot3", 342 /* WXK_F3 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot4", 343 /* WXK_F4 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot5", 344 /* WXK_F5 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot6", 345 /* WXK_F6 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot7", 346 /* WXK_F7 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot8", 347 /* WXK_F8 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SaveStateSlot10", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "SelectStateSlot1", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot2", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot3", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot4", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot5", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot6", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot7", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot8", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot9", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SelectStateSlot10", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "SaveSelectedSlot", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadSelectedSlot", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "LoadLastState1", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState2", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState3", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState4", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState5", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState6", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState7", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadLastState8", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
|
|
|
|
{ "SaveFirstState", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "UndoLoadState", 351 /* WXK_F12 */, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "UndoSaveState", 351 /* WXK_F12 */, 4 /* wxMOD_SHIFT */ },
|
|
|
|
{ "SaveStateFile", 0, 0 /* wxMOD_NONE */ },
|
|
|
|
{ "LoadStateFile", 0, 0 /* wxMOD_NONE */ },
|
2010-04-25 20:10:16 +00:00
|
|
|
};
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
SConfig::SConfig()
|
2010-02-16 04:34:41 +00:00
|
|
|
{
|
2010-02-19 18:50:01 +00:00
|
|
|
// Make sure we have log manager
|
|
|
|
LoadSettings();
|
2010-02-16 04:34:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::Init()
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2010-02-19 18:50:01 +00:00
|
|
|
m_Instance = new SConfig;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
2010-02-16 04:34:41 +00:00
|
|
|
void SConfig::Shutdown()
|
|
|
|
{
|
2010-02-19 18:50:01 +00:00
|
|
|
delete m_Instance;
|
2014-03-09 21:14:26 +01:00
|
|
|
m_Instance = nullptr;
|
2010-02-16 04:34:41 +00:00
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
SConfig::~SConfig()
|
|
|
|
{
|
|
|
|
SaveSettings();
|
2009-09-14 06:26:49 +00:00
|
|
|
delete m_SYSCONF;
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void SConfig::SaveSettings()
|
|
|
|
{
|
2011-02-28 20:40:15 +00:00
|
|
|
NOTICE_LOG(BOOT, "Saving settings to %s", File::GetUserPath(F_DOLPHINCONFIG_IDX).c_str());
|
2008-12-08 05:30:24 +00:00
|
|
|
IniFile ini;
|
2010-04-08 16:59:35 +00:00
|
|
|
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX)); // load first to not kill unknown stuff
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
SaveGeneralSettings(ini);
|
|
|
|
SaveInterfaceSettings(ini);
|
|
|
|
SaveHotkeySettings(ini);
|
|
|
|
SaveDisplaySettings(ini);
|
|
|
|
SaveGameListSettings(ini);
|
|
|
|
SaveCoreSettings(ini);
|
|
|
|
SaveMovieSettings(ini);
|
|
|
|
SaveDSPSettings(ini);
|
2014-07-11 10:42:44 -04:00
|
|
|
SaveInputSettings(ini);
|
2014-06-16 01:12:43 -04:00
|
|
|
SaveFifoPlayerSettings(ini);
|
|
|
|
|
|
|
|
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
|
|
|
m_SYSCONF->Save();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::SaveGeneralSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* general = ini.GetOrCreateSection("General");
|
|
|
|
|
2009-01-14 16:36:43 +00:00
|
|
|
// General
|
2014-06-16 01:12:43 -04:00
|
|
|
general->Set("LastFilename", m_LastFilename);
|
|
|
|
general->Set("ShowLag", m_ShowLag);
|
2014-09-30 18:49:44 -04:00
|
|
|
general->Set("ShowFrameCount", m_ShowFrameCount);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
// ISO folders
|
2014-06-16 01:12:43 -04:00
|
|
|
// Clear removed folders
|
|
|
|
int oldPaths;
|
|
|
|
int numPaths = (int)m_ISOFolder.size();
|
2014-10-20 17:49:33 -04:00
|
|
|
general->Get("ISOPaths", &oldPaths, 0);
|
2011-05-24 19:12:18 +00:00
|
|
|
for (int i = numPaths; i < oldPaths; i++)
|
|
|
|
{
|
2014-10-20 17:49:33 -04:00
|
|
|
ini.DeleteKey("General", StringFromFormat("ISOPath%i", i));
|
2011-05-24 19:12:18 +00:00
|
|
|
}
|
2009-04-05 06:46:18 +00:00
|
|
|
|
2014-10-20 17:49:33 -04:00
|
|
|
general->Set("ISOPaths", numPaths);
|
2011-05-24 19:12:18 +00:00
|
|
|
for (int i = 0; i < numPaths; i++)
|
2010-04-08 16:59:35 +00:00
|
|
|
{
|
2014-10-20 17:49:33 -04:00
|
|
|
general->Set(StringFromFormat("ISOPath%i", i), m_ISOFolder[i]);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
2014-10-20 17:49:33 -04:00
|
|
|
general->Set("RecursiveISOPaths", m_RecursiveISOFolder);
|
2014-06-16 01:12:43 -04:00
|
|
|
general->Set("NANDRootPath", m_NANDPath);
|
|
|
|
general->Set("WirelessMac", m_WirelessMac);
|
|
|
|
|
|
|
|
#ifdef USE_GDBSTUB
|
2015-05-05 01:15:16 +02:00
|
|
|
#ifndef _WIN32
|
|
|
|
general->Set("GDBSocket", m_LocalCoreStartupParameter.gdb_socket);
|
|
|
|
#endif
|
2014-06-16 01:12:43 -04:00
|
|
|
general->Set("GDBPort", m_LocalCoreStartupParameter.iGDBPort);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::SaveInterfaceSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
|
|
|
|
|
|
|
|
interface->Set("ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
|
|
|
interface->Set("UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
|
|
|
interface->Set("OnScreenDisplayMessages", m_LocalCoreStartupParameter.bOnScreenDisplayMessages);
|
|
|
|
interface->Set("HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
|
|
|
interface->Set("AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
|
|
|
interface->Set("MainWindowPosX", (m_LocalCoreStartupParameter.iPosX == -32000) ? 0 : m_LocalCoreStartupParameter.iPosX); // TODO - HAX
|
|
|
|
interface->Set("MainWindowPosY", (m_LocalCoreStartupParameter.iPosY == -32000) ? 0 : m_LocalCoreStartupParameter.iPosY); // TODO - HAX
|
|
|
|
interface->Set("MainWindowWidth", m_LocalCoreStartupParameter.iWidth);
|
|
|
|
interface->Set("MainWindowHeight", m_LocalCoreStartupParameter.iHeight);
|
|
|
|
interface->Set("Language", m_InterfaceLanguage);
|
|
|
|
interface->Set("ShowToolbar", m_InterfaceToolbar);
|
|
|
|
interface->Set("ShowStatusbar", m_InterfaceStatusbar);
|
|
|
|
interface->Set("ShowLogWindow", m_InterfaceLogWindow);
|
|
|
|
interface->Set("ShowLogConfigWindow", m_InterfaceLogConfigWindow);
|
|
|
|
interface->Set("ExtendedFPSInfo", m_InterfaceExtendedFPSInfo);
|
|
|
|
interface->Set("ThemeName40", m_LocalCoreStartupParameter.theme_name);
|
2015-03-16 20:28:17 -07:00
|
|
|
interface->Set("PauseOnFocusLost", m_PauseOnFocusLost);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::SaveHotkeySettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* hotkeys = ini.GetOrCreateSection("Hotkeys");
|
|
|
|
|
2011-02-12 06:46:33 +00:00
|
|
|
for (int i = 0; i < NUM_HOTKEYS; i++)
|
2010-04-25 20:10:16 +00:00
|
|
|
{
|
2014-06-16 01:12:43 -04:00
|
|
|
hotkeys->Set(g_HKData[i].IniText, m_LocalCoreStartupParameter.iHotkey[i]);
|
|
|
|
hotkeys->Set(std::string(g_HKData[i].IniText) + "Modifier",
|
|
|
|
m_LocalCoreStartupParameter.iHotkeyModifier[i]);
|
2010-04-25 20:10:16 +00:00
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
2010-04-12 01:33:10 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::SaveDisplaySettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* display = ini.GetOrCreateSection("Display");
|
|
|
|
|
|
|
|
display->Set("FullscreenResolution", m_LocalCoreStartupParameter.strFullscreenResolution);
|
|
|
|
display->Set("Fullscreen", m_LocalCoreStartupParameter.bFullscreen);
|
|
|
|
display->Set("RenderToMain", m_LocalCoreStartupParameter.bRenderToMain);
|
|
|
|
display->Set("RenderWindowXPos", m_LocalCoreStartupParameter.iRenderWindowXPos);
|
|
|
|
display->Set("RenderWindowYPos", m_LocalCoreStartupParameter.iRenderWindowYPos);
|
|
|
|
display->Set("RenderWindowWidth", m_LocalCoreStartupParameter.iRenderWindowWidth);
|
|
|
|
display->Set("RenderWindowHeight", m_LocalCoreStartupParameter.iRenderWindowHeight);
|
|
|
|
display->Set("RenderWindowAutoSize", m_LocalCoreStartupParameter.bRenderWindowAutoSize);
|
|
|
|
display->Set("KeepWindowOnTop", m_LocalCoreStartupParameter.bKeepWindowOnTop);
|
|
|
|
display->Set("ProgressiveScan", m_LocalCoreStartupParameter.bProgressive);
|
|
|
|
display->Set("DisableScreenSaver", m_LocalCoreStartupParameter.bDisableScreenSaver);
|
|
|
|
display->Set("ForceNTSCJ", m_LocalCoreStartupParameter.bForceNTSCJ);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::SaveGameListSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* gamelist = ini.GetOrCreateSection("GameList");
|
|
|
|
|
|
|
|
gamelist->Set("ListDrives", m_ListDrives);
|
|
|
|
gamelist->Set("ListWad", m_ListWad);
|
|
|
|
gamelist->Set("ListWii", m_ListWii);
|
|
|
|
gamelist->Set("ListGC", m_ListGC);
|
|
|
|
gamelist->Set("ListJap", m_ListJap);
|
|
|
|
gamelist->Set("ListPal", m_ListPal);
|
|
|
|
gamelist->Set("ListUsa", m_ListUsa);
|
2014-10-30 10:35:46 -04:00
|
|
|
gamelist->Set("ListAustralia", m_ListAustralia);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Set("ListFrance", m_ListFrance);
|
2014-10-30 10:35:46 -04:00
|
|
|
gamelist->Set("ListGermany", m_ListGermany);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Set("ListItaly", m_ListItaly);
|
|
|
|
gamelist->Set("ListKorea", m_ListKorea);
|
2014-10-30 10:35:46 -04:00
|
|
|
gamelist->Set("ListNetherlands", m_ListNetherlands);
|
|
|
|
gamelist->Set("ListRussia", m_ListRussia);
|
|
|
|
gamelist->Set("ListSpain", m_ListSpain);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Set("ListTaiwan", m_ListTaiwan);
|
2015-04-08 18:55:16 -04:00
|
|
|
gamelist->Set("ListWorld", m_ListWorld);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Set("ListUnknown", m_ListUnknown);
|
|
|
|
gamelist->Set("ListSort", m_ListSort);
|
|
|
|
gamelist->Set("ListSortSecondary", m_ListSort2);
|
|
|
|
|
|
|
|
gamelist->Set("ColorCompressed", m_ColorCompressed);
|
|
|
|
|
|
|
|
gamelist->Set("ColumnPlatform", m_showSystemColumn);
|
|
|
|
gamelist->Set("ColumnBanner", m_showBannerColumn);
|
2015-04-20 13:00:15 +02:00
|
|
|
gamelist->Set("ColumnNotes", m_showMakerColumn);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Set("ColumnID", m_showIDColumn);
|
|
|
|
gamelist->Set("ColumnRegion", m_showRegionColumn);
|
|
|
|
gamelist->Set("ColumnSize", m_showSizeColumn);
|
|
|
|
gamelist->Set("ColumnState", m_showStateColumn);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::SaveCoreSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
|
|
|
|
|
|
|
core->Set("HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
|
|
|
|
core->Set("CPUCore", m_LocalCoreStartupParameter.iCPUCore);
|
|
|
|
core->Set("Fastmem", m_LocalCoreStartupParameter.bFastmem);
|
|
|
|
core->Set("CPUThread", m_LocalCoreStartupParameter.bCPUThread);
|
|
|
|
core->Set("DSPHLE", m_LocalCoreStartupParameter.bDSPHLE);
|
|
|
|
core->Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
2014-12-21 11:54:53 +01:00
|
|
|
core->Set("SyncOnSkipIdle", m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack);
|
2014-10-20 17:49:33 -04:00
|
|
|
core->Set("DefaultISO", m_LocalCoreStartupParameter.m_strDefaultISO);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Set("DVDRoot", m_LocalCoreStartupParameter.m_strDVDRoot);
|
|
|
|
core->Set("Apploader", m_LocalCoreStartupParameter.m_strApploader);
|
|
|
|
core->Set("EnableCheats", m_LocalCoreStartupParameter.bEnableCheats);
|
|
|
|
core->Set("SelectedLanguage", m_LocalCoreStartupParameter.SelectedLanguage);
|
|
|
|
core->Set("DPL2Decoder", m_LocalCoreStartupParameter.bDPL2Decoder);
|
|
|
|
core->Set("Latency", m_LocalCoreStartupParameter.iLatency);
|
|
|
|
core->Set("MemcardAPath", m_strMemoryCardA);
|
|
|
|
core->Set("MemcardBPath", m_strMemoryCardB);
|
2015-01-20 23:41:46 +11:00
|
|
|
core->Set("AgpCartAPath", m_strGbaCartA);
|
|
|
|
core->Set("AgpCartBPath", m_strGbaCartB);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Set("SlotA", m_EXIDevice[0]);
|
|
|
|
core->Set("SlotB", m_EXIDevice[1]);
|
|
|
|
core->Set("SerialPort1", m_EXIDevice[2]);
|
|
|
|
core->Set("BBA_MAC", m_bba_mac);
|
2014-02-08 18:50:37 +13:00
|
|
|
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Set(StringFromFormat("SIDevice%i", i), m_SIDevice[i]);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Set("WiiSDCard", m_WiiSDCard);
|
|
|
|
core->Set("WiiKeyboard", m_WiiKeyboard);
|
|
|
|
core->Set("WiimoteContinuousScanning", m_WiimoteContinuousScanning);
|
|
|
|
core->Set("WiimoteEnableSpeaker", m_WiimoteEnableSpeaker);
|
|
|
|
core->Set("RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
|
|
|
core->Set("RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
|
|
|
core->Set("FrameLimit", m_Framelimit);
|
|
|
|
core->Set("FrameSkip", m_FrameSkip);
|
2014-12-31 10:24:14 -08:00
|
|
|
core->Set("Overclock", m_OCFactor);
|
|
|
|
core->Set("OverclockEnable", m_OCEnable);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Set("GFXBackend", m_LocalCoreStartupParameter.m_strVideoBackend);
|
2014-09-06 17:43:43 -04:00
|
|
|
core->Set("GPUDeterminismMode", m_LocalCoreStartupParameter.m_strGPUDeterminismMode);
|
2014-12-10 20:45:45 +11:00
|
|
|
core->Set("GameCubeAdapter", m_GameCubeAdapter);
|
2015-04-27 00:42:12 +02:00
|
|
|
core->Set("AdapterRumble", m_AdapterRumble);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
2013-08-18 21:25:16 +02:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::SaveMovieSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* movie = ini.GetOrCreateSection("Movie");
|
|
|
|
|
|
|
|
movie->Set("PauseMovie", m_PauseMovie);
|
|
|
|
movie->Set("Author", m_strMovieAuthor);
|
2014-10-12 23:53:10 -04:00
|
|
|
movie->Set("DumpFrames", m_DumpFrames);
|
2015-02-14 23:38:14 +01:00
|
|
|
movie->Set("DumpFramesSilent", m_DumpFramesSilent);
|
2014-10-17 21:08:34 -04:00
|
|
|
movie->Set("ShowInputDisplay", m_ShowInputDisplay);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::SaveDSPSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
|
|
|
|
|
|
|
dsp->Set("EnableJIT", m_DSPEnableJIT);
|
|
|
|
dsp->Set("DumpAudio", m_DumpAudio);
|
|
|
|
dsp->Set("Backend", sBackend);
|
|
|
|
dsp->Set("Volume", m_Volume);
|
2014-04-26 00:51:38 +02:00
|
|
|
dsp->Set("CaptureLog", m_DSPCaptureLog);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
|
|
|
|
2014-07-11 10:42:44 -04:00
|
|
|
void SConfig::SaveInputSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
|
|
|
|
|
|
|
input->Set("BackgroundInput", m_BackgroundInput);
|
|
|
|
}
|
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::SaveFifoPlayerSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
|
|
|
|
|
|
|
|
fifoplayer->Set("LoopReplay", m_LocalCoreStartupParameter.bLoopFifoReplay);
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
void SConfig::LoadSettings()
|
2009-09-14 06:26:49 +00:00
|
|
|
{
|
2011-02-28 20:40:15 +00:00
|
|
|
INFO_LOG(BOOT, "Loading Settings from %s", File::GetUserPath(F_DOLPHINCONFIG_IDX).c_str());
|
2008-12-08 05:30:24 +00:00
|
|
|
IniFile ini;
|
2010-02-02 21:56:29 +00:00
|
|
|
ini.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
LoadGeneralSettings(ini);
|
|
|
|
LoadInterfaceSettings(ini);
|
|
|
|
LoadHotkeySettings(ini);
|
|
|
|
LoadDisplaySettings(ini);
|
|
|
|
LoadGameListSettings(ini);
|
|
|
|
LoadCoreSettings(ini);
|
|
|
|
LoadMovieSettings(ini);
|
|
|
|
LoadDSPSettings(ini);
|
2014-07-11 10:42:44 -04:00
|
|
|
LoadInputSettings(ini);
|
2014-06-16 01:12:43 -04:00
|
|
|
LoadFifoPlayerSettings(ini);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
m_SYSCONF = new SysConf();
|
|
|
|
}
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::LoadGeneralSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* general = ini.GetOrCreateSection("General");
|
2009-04-05 06:46:18 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
general->Get("LastFilename", &m_LastFilename);
|
|
|
|
general->Get("ShowLag", &m_ShowLag, false);
|
2014-09-30 18:49:44 -04:00
|
|
|
general->Get("ShowFrameCount", &m_ShowFrameCount, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
#ifdef USE_GDBSTUB
|
2015-05-05 01:15:16 +02:00
|
|
|
#ifndef _WIN32
|
|
|
|
general->Get("GDBSocket", &m_LocalCoreStartupParameter.gdb_socket, "");
|
|
|
|
#endif
|
2014-06-16 01:12:43 -04:00
|
|
|
general->Get("GDBPort", &(m_LocalCoreStartupParameter.iGDBPort), -1);
|
|
|
|
#endif
|
2011-05-24 19:12:18 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
m_ISOFolder.clear();
|
2014-10-20 17:49:33 -04:00
|
|
|
int numISOPaths;
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2014-10-20 17:49:33 -04:00
|
|
|
if (general->Get("ISOPaths", &numISOPaths, 0))
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2014-10-20 17:49:33 -04:00
|
|
|
for (int i = 0; i < numISOPaths; i++)
|
2010-04-25 20:10:16 +00:00
|
|
|
{
|
2014-06-16 01:12:43 -04:00
|
|
|
std::string tmpPath;
|
2014-10-20 17:49:33 -04:00
|
|
|
general->Get(StringFromFormat("ISOPath%i", i), &tmpPath, "");
|
2014-06-16 01:12:43 -04:00
|
|
|
m_ISOFolder.push_back(std::move(tmpPath));
|
2010-04-25 20:10:16 +00:00
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
2015-03-17 14:21:12 -04:00
|
|
|
// Check for old file path (Changed in 4.0-4003)
|
|
|
|
// This can probably be removed after 5.0 stable is launched
|
|
|
|
else if (general->Get("GCMPathes", &numISOPaths, 0))
|
|
|
|
{
|
|
|
|
for (int i = 0; i < numISOPaths; i++)
|
|
|
|
{
|
|
|
|
std::string tmpPath;
|
|
|
|
general->Get(StringFromFormat("GCMPath%i", i), &tmpPath, "");
|
|
|
|
bool found = false;
|
2015-04-02 14:30:38 -04:00
|
|
|
for (size_t j = 0; j < m_ISOFolder.size(); ++j)
|
2015-03-17 14:21:12 -04:00
|
|
|
{
|
|
|
|
if (m_ISOFolder[j] == tmpPath)
|
|
|
|
{
|
|
|
|
found = true;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!found)
|
|
|
|
m_ISOFolder.push_back(std::move(tmpPath));
|
|
|
|
}
|
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
|
2015-03-17 14:21:12 -04:00
|
|
|
if (!general->Get("RecursiveISOPaths", &m_RecursiveISOFolder, false))
|
|
|
|
{
|
|
|
|
// Check for old name
|
|
|
|
general->Get("RecursiveGCMPaths", &m_RecursiveISOFolder, false);
|
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
|
|
|
|
general->Get("NANDRootPath", &m_NANDPath);
|
2015-03-15 08:51:13 -05:00
|
|
|
File::SetUserPath(D_WIIROOT_IDX, m_NANDPath);
|
2014-06-16 01:12:43 -04:00
|
|
|
DiscIO::cUIDsys::AccessInstance().UpdateLocation();
|
|
|
|
DiscIO::CSharedContent::AccessInstance().UpdateLocation();
|
|
|
|
general->Get("WirelessMac", &m_WirelessMac);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadInterfaceSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* interface = ini.GetOrCreateSection("Interface");
|
|
|
|
|
|
|
|
interface->Get("ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, true);
|
|
|
|
interface->Get("UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
|
|
|
interface->Get("OnScreenDisplayMessages", &m_LocalCoreStartupParameter.bOnScreenDisplayMessages, true);
|
|
|
|
interface->Get("HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
|
|
|
interface->Get("AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
|
|
|
interface->Get("MainWindowPosX", &m_LocalCoreStartupParameter.iPosX, 100);
|
|
|
|
interface->Get("MainWindowPosY", &m_LocalCoreStartupParameter.iPosY, 100);
|
|
|
|
interface->Get("MainWindowWidth", &m_LocalCoreStartupParameter.iWidth, 800);
|
|
|
|
interface->Get("MainWindowHeight", &m_LocalCoreStartupParameter.iHeight, 600);
|
|
|
|
interface->Get("Language", &m_InterfaceLanguage, 0);
|
|
|
|
interface->Get("ShowToolbar", &m_InterfaceToolbar, true);
|
|
|
|
interface->Get("ShowStatusbar", &m_InterfaceStatusbar, true);
|
|
|
|
interface->Get("ShowLogWindow", &m_InterfaceLogWindow, false);
|
|
|
|
interface->Get("ShowLogConfigWindow", &m_InterfaceLogConfigWindow, false);
|
|
|
|
interface->Get("ExtendedFPSInfo", &m_InterfaceExtendedFPSInfo, false);
|
|
|
|
interface->Get("ThemeName40", &m_LocalCoreStartupParameter.theme_name, "Clean");
|
2015-03-16 20:28:17 -07:00
|
|
|
interface->Get("PauseOnFocusLost", &m_PauseOnFocusLost, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadHotkeySettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* hotkeys = ini.GetOrCreateSection("Hotkeys");
|
|
|
|
|
|
|
|
for (int i = 0; i < NUM_HOTKEYS; i++)
|
|
|
|
{
|
|
|
|
hotkeys->Get(g_HKData[i].IniText,
|
|
|
|
&m_LocalCoreStartupParameter.iHotkey[i], g_HKData[i].DefaultKey);
|
|
|
|
hotkeys->Get(std::string(g_HKData[i].IniText) + "Modifier",
|
|
|
|
&m_LocalCoreStartupParameter.iHotkeyModifier[i], g_HKData[i].DefaultModifier);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadDisplaySettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* display = ini.GetOrCreateSection("Display");
|
|
|
|
|
|
|
|
display->Get("Fullscreen", &m_LocalCoreStartupParameter.bFullscreen, false);
|
|
|
|
display->Get("FullscreenResolution", &m_LocalCoreStartupParameter.strFullscreenResolution, "Auto");
|
|
|
|
display->Get("RenderToMain", &m_LocalCoreStartupParameter.bRenderToMain, false);
|
|
|
|
display->Get("RenderWindowXPos", &m_LocalCoreStartupParameter.iRenderWindowXPos, -1);
|
|
|
|
display->Get("RenderWindowYPos", &m_LocalCoreStartupParameter.iRenderWindowYPos, -1);
|
|
|
|
display->Get("RenderWindowWidth", &m_LocalCoreStartupParameter.iRenderWindowWidth, 640);
|
|
|
|
display->Get("RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480);
|
|
|
|
display->Get("RenderWindowAutoSize", &m_LocalCoreStartupParameter.bRenderWindowAutoSize, false);
|
|
|
|
display->Get("KeepWindowOnTop", &m_LocalCoreStartupParameter.bKeepWindowOnTop, false);
|
|
|
|
display->Get("ProgressiveScan", &m_LocalCoreStartupParameter.bProgressive, false);
|
|
|
|
display->Get("DisableScreenSaver", &m_LocalCoreStartupParameter.bDisableScreenSaver, true);
|
|
|
|
display->Get("ForceNTSCJ", &m_LocalCoreStartupParameter.bForceNTSCJ, false);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadGameListSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* gamelist = ini.GetOrCreateSection("GameList");
|
|
|
|
|
2014-10-30 10:35:46 -04:00
|
|
|
gamelist->Get("ListDrives", &m_ListDrives, false);
|
|
|
|
gamelist->Get("ListWad", &m_ListWad, true);
|
|
|
|
gamelist->Get("ListWii", &m_ListWii, true);
|
|
|
|
gamelist->Get("ListGC", &m_ListGC, true);
|
|
|
|
gamelist->Get("ListJap", &m_ListJap, true);
|
|
|
|
gamelist->Get("ListPal", &m_ListPal, true);
|
|
|
|
gamelist->Get("ListUsa", &m_ListUsa, true);
|
|
|
|
|
|
|
|
gamelist->Get("ListAustralia", &m_ListAustralia, true);
|
|
|
|
gamelist->Get("ListFrance", &m_ListFrance, true);
|
|
|
|
gamelist->Get("ListGermany", &m_ListGermany, true);
|
|
|
|
gamelist->Get("ListItaly", &m_ListItaly, true);
|
|
|
|
gamelist->Get("ListKorea", &m_ListKorea, true);
|
|
|
|
gamelist->Get("ListNetherlands", &m_ListNetherlands, true);
|
|
|
|
gamelist->Get("ListRussia", &m_ListRussia, true);
|
|
|
|
gamelist->Get("ListSpain", &m_ListSpain, true);
|
|
|
|
gamelist->Get("ListTaiwan", &m_ListTaiwan, true);
|
2015-04-08 18:55:16 -04:00
|
|
|
gamelist->Get("ListWorld", &m_ListWorld, true);
|
2014-10-30 10:35:46 -04:00
|
|
|
gamelist->Get("ListUnknown", &m_ListUnknown, true);
|
|
|
|
gamelist->Get("ListSort", &m_ListSort, 3);
|
|
|
|
gamelist->Get("ListSortSecondary", &m_ListSort2, 0);
|
2014-06-16 01:12:43 -04:00
|
|
|
|
|
|
|
// Determines if compressed games display in blue
|
|
|
|
gamelist->Get("ColorCompressed", &m_ColorCompressed, true);
|
|
|
|
|
|
|
|
// Gamelist columns toggles
|
|
|
|
gamelist->Get("ColumnPlatform", &m_showSystemColumn, true);
|
|
|
|
gamelist->Get("ColumnBanner", &m_showBannerColumn, true);
|
2015-04-20 13:00:15 +02:00
|
|
|
gamelist->Get("ColumnNotes", &m_showMakerColumn, true);
|
2014-06-16 01:12:43 -04:00
|
|
|
gamelist->Get("ColumnID", &m_showIDColumn, false);
|
|
|
|
gamelist->Get("ColumnRegion", &m_showRegionColumn, true);
|
|
|
|
gamelist->Get("ColumnSize", &m_showSizeColumn, true);
|
|
|
|
gamelist->Get("ColumnState", &m_showStateColumn, true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadCoreSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* core = ini.GetOrCreateSection("Core");
|
2010-04-12 01:33:10 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, false);
|
2014-03-02 05:21:50 -06:00
|
|
|
#ifdef _M_X86
|
2015-02-19 10:29:21 -05:00
|
|
|
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_JIT64);
|
2014-03-02 05:21:50 -06:00
|
|
|
#elif _M_ARM_32
|
2015-02-19 10:29:21 -05:00
|
|
|
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_JITARM);
|
2015-01-26 00:50:25 -06:00
|
|
|
#elif _M_ARM_64
|
2015-02-19 10:29:21 -05:00
|
|
|
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_JITARM64);
|
2013-02-28 16:15:32 -06:00
|
|
|
#else
|
2015-02-19 10:29:21 -05:00
|
|
|
core->Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, PowerPC::CORE_INTERPRETER);
|
2013-02-28 16:15:32 -06:00
|
|
|
#endif
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("Fastmem", &m_LocalCoreStartupParameter.bFastmem, true);
|
|
|
|
core->Get("DSPHLE", &m_LocalCoreStartupParameter.bDSPHLE, true);
|
|
|
|
core->Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
|
|
|
|
core->Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
2014-12-21 11:54:53 +01:00
|
|
|
core->Get("SyncOnSkipIdle", &m_LocalCoreStartupParameter.bSyncGPUOnSkipIdleHack, true);
|
2014-10-20 17:49:33 -04:00
|
|
|
core->Get("DefaultISO", &m_LocalCoreStartupParameter.m_strDefaultISO);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("DVDRoot", &m_LocalCoreStartupParameter.m_strDVDRoot);
|
|
|
|
core->Get("Apploader", &m_LocalCoreStartupParameter.m_strApploader);
|
|
|
|
core->Get("EnableCheats", &m_LocalCoreStartupParameter.bEnableCheats, false);
|
|
|
|
core->Get("SelectedLanguage", &m_LocalCoreStartupParameter.SelectedLanguage, 0);
|
|
|
|
core->Get("DPL2Decoder", &m_LocalCoreStartupParameter.bDPL2Decoder, false);
|
|
|
|
core->Get("Latency", &m_LocalCoreStartupParameter.iLatency, 2);
|
|
|
|
core->Get("MemcardAPath", &m_strMemoryCardA);
|
|
|
|
core->Get("MemcardBPath", &m_strMemoryCardB);
|
2015-01-20 23:41:46 +11:00
|
|
|
core->Get("AgpCartAPath", &m_strGbaCartA);
|
|
|
|
core->Get("AgpCartBPath", &m_strGbaCartB);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD);
|
|
|
|
core->Get("SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_NONE);
|
|
|
|
core->Get("SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
|
|
|
core->Get("BBA_MAC", &m_bba_mac);
|
|
|
|
core->Get("TimeProfiling", &m_LocalCoreStartupParameter.bJITILTimeProfiling, false);
|
|
|
|
core->Get("OutputIR", &m_LocalCoreStartupParameter.bJITILOutputIR, false);
|
|
|
|
for (int i = 0; i < MAX_SI_CHANNELS; ++i)
|
|
|
|
{
|
|
|
|
core->Get(StringFromFormat("SIDevice%i", i), (u32*)&m_SIDevice[i], (i == 0) ? SIDEVICE_GC_CONTROLLER : SIDEVICE_NONE);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("WiiSDCard", &m_WiiSDCard, false);
|
|
|
|
core->Get("WiiKeyboard", &m_WiiKeyboard, false);
|
|
|
|
core->Get("WiimoteContinuousScanning", &m_WiimoteContinuousScanning, false);
|
2014-09-06 01:23:54 +10:00
|
|
|
core->Get("WiimoteEnableSpeaker", &m_WiimoteEnableSpeaker, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
|
|
|
core->Get("RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
|
|
|
core->Get("MMU", &m_LocalCoreStartupParameter.bMMU, false);
|
|
|
|
core->Get("BBDumpPort", &m_LocalCoreStartupParameter.iBBDumpPort, -1);
|
|
|
|
core->Get("SyncGPU", &m_LocalCoreStartupParameter.bSyncGPU, false);
|
|
|
|
core->Get("FastDiscSpeed", &m_LocalCoreStartupParameter.bFastDiscSpeed, false);
|
|
|
|
core->Get("DCBZ", &m_LocalCoreStartupParameter.bDCBZOFF, false);
|
|
|
|
core->Get("FrameLimit", &m_Framelimit, 1); // auto frame limit by default
|
2014-12-31 10:24:14 -08:00
|
|
|
core->Get("Overclock", &m_OCFactor, 1.0f);
|
|
|
|
core->Get("OverclockEnable", &m_OCEnable, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
core->Get("FrameSkip", &m_FrameSkip, 0);
|
|
|
|
core->Get("GFXBackend", &m_LocalCoreStartupParameter.m_strVideoBackend, "");
|
2014-09-06 17:43:43 -04:00
|
|
|
core->Get("GPUDeterminismMode", &m_LocalCoreStartupParameter.m_strGPUDeterminismMode, "auto");
|
2014-12-10 20:45:45 +11:00
|
|
|
core->Get("GameCubeAdapter", &m_GameCubeAdapter, true);
|
2015-04-27 00:42:12 +02:00
|
|
|
core->Get("AdapterRumble", &m_AdapterRumble, true);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
2009-09-14 06:26:49 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::LoadMovieSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* movie = ini.GetOrCreateSection("Movie");
|
|
|
|
|
|
|
|
movie->Get("PauseMovie", &m_PauseMovie, false);
|
|
|
|
movie->Get("Author", &m_strMovieAuthor, "");
|
2014-10-12 23:53:10 -04:00
|
|
|
movie->Get("DumpFrames", &m_DumpFrames, false);
|
2015-02-14 23:38:14 +01:00
|
|
|
movie->Get("DumpFramesSilent", &m_DumpFramesSilent, false);
|
2014-10-17 21:08:34 -04:00
|
|
|
movie->Get("ShowInputDisplay", &m_ShowInputDisplay, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
void SConfig::LoadDSPSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* dsp = ini.GetOrCreateSection("DSP");
|
|
|
|
|
|
|
|
dsp->Get("EnableJIT", &m_DSPEnableJIT, true);
|
|
|
|
dsp->Get("DumpAudio", &m_DumpAudio, false);
|
|
|
|
#if defined __linux__ && HAVE_ALSA
|
|
|
|
dsp->Get("Backend", &sBackend, BACKEND_ALSA);
|
|
|
|
#elif defined __APPLE__
|
|
|
|
dsp->Get("Backend", &sBackend, BACKEND_COREAUDIO);
|
|
|
|
#elif defined _WIN32
|
|
|
|
dsp->Get("Backend", &sBackend, BACKEND_XAUDIO2);
|
|
|
|
#elif defined ANDROID
|
|
|
|
dsp->Get("Backend", &sBackend, BACKEND_OPENSLES);
|
|
|
|
#else
|
|
|
|
dsp->Get("Backend", &sBackend, BACKEND_NULLSOUND);
|
|
|
|
#endif
|
|
|
|
dsp->Get("Volume", &m_Volume, 100);
|
2014-07-06 11:05:16 +02:00
|
|
|
dsp->Get("CaptureLog", &m_DSPCaptureLog, false);
|
2014-12-28 22:03:21 +01:00
|
|
|
|
|
|
|
m_IsMuted = false;
|
2014-06-16 01:12:43 -04:00
|
|
|
}
|
|
|
|
|
2014-07-11 10:42:44 -04:00
|
|
|
void SConfig::LoadInputSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* input = ini.GetOrCreateSection("Input");
|
|
|
|
|
|
|
|
input->Get("BackgroundInput", &m_BackgroundInput, false);
|
|
|
|
}
|
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
void SConfig::LoadFifoPlayerSettings(IniFile& ini)
|
|
|
|
{
|
|
|
|
IniFile::Section* fifoplayer = ini.GetOrCreateSection("FifoPlayer");
|
|
|
|
|
|
|
|
fifoplayer->Get("LoopReplay", &m_LocalCoreStartupParameter.bLoopFifoReplay, true);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|