2009-07-28 21:32:10 +00:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
|
|
|
|
|
// Official SVN repository and contact information can be found at
|
|
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
|
|
#include "Common.h"
|
|
|
|
|
#include "IniFile.h"
|
2009-01-17 23:41:21 +00:00
|
|
|
#include "ConfigManager.h"
|
2009-03-18 17:17:58 +00:00
|
|
|
#include "PluginManager.h"
|
2009-02-26 07:24:50 +00:00
|
|
|
#include "FileUtil.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
|
|
|
|
2010-04-25 20:10:16 +00:00
|
|
|
static const struct {
|
|
|
|
|
const char* IniText;
|
|
|
|
|
const int DefaultKey;
|
|
|
|
|
const int DefaultModifier;
|
|
|
|
|
} g_HKData[] = {
|
|
|
|
|
{ "ToggleFullscreen", 13 /* WXK_RETURN */, 0x0001 /* wxMOD_ALT */ },
|
|
|
|
|
{ "PlayPause", 349 /* WXK_F10 */, 0x0000 /* wxMOD_NONE */ },
|
|
|
|
|
{ "Stop", 27 /* WXK_ESCAPE */, 0x0000 /* wxMOD_NONE */ },
|
|
|
|
|
{ "Wiimote1Connect", 344 /* WXK_F5 */, 0x0001 /* wxMOD_ALT */ },
|
|
|
|
|
{ "Wiimote2Connect", 345 /* WXK_F6 */, 0x0001 /* wxMOD_ALT */ },
|
|
|
|
|
{ "Wiimote3Connect", 346 /* WXK_F7 */, 0x0001 /* wxMOD_ALT */ },
|
|
|
|
|
{ "Wiimote4Connect", 347 /* WXK_F8 */, 0x0001 /* wxMOD_ALT */ },
|
|
|
|
|
};
|
|
|
|
|
|
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-04-14 11:27:26 +00:00
|
|
|
//Make sure we load any extra settings
|
2010-03-30 17:57:44 +00:00
|
|
|
LoadSettingsWii();
|
2010-03-30 11:53:41 +00:00
|
|
|
|
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;
|
|
|
|
|
m_Instance = NULL;
|
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()
|
|
|
|
|
{
|
2010-02-02 21:56:29 +00:00
|
|
|
NOTICE_LOG(BOOT, "Saving Settings to %s", File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
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
|
|
|
|
2009-01-14 16:36:43 +00:00
|
|
|
// General
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& general = ini["General"];
|
|
|
|
|
general.Set("LastFilename", m_LastFilename);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
// ISO folders
|
2010-06-03 04:55:39 +00:00
|
|
|
general.Set("GCMPathes", (int)m_ISOFolder.size());
|
2009-04-05 06:46:18 +00:00
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
for (size_t i = 0; i < m_ISOFolder.size(); i++)
|
|
|
|
|
{
|
|
|
|
|
TCHAR tmp[16];
|
|
|
|
|
sprintf(tmp, "GCMPath%i", (int)i);
|
2010-06-03 04:55:39 +00:00
|
|
|
general.Set(tmp, m_ISOFolder[i]);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-03 04:55:39 +00:00
|
|
|
general.Set("RecersiveGCMPaths", m_RecursiveISOFolder);
|
|
|
|
|
|
|
|
|
|
// Interface
|
|
|
|
|
Section& iface = ini["Interface"];
|
|
|
|
|
iface.Set("ConfirmStop", m_LocalCoreStartupParameter.bConfirmStop);
|
|
|
|
|
iface.Set("UsePanicHandlers", m_LocalCoreStartupParameter.bUsePanicHandlers);
|
|
|
|
|
iface.Set("HideCursor", m_LocalCoreStartupParameter.bHideCursor);
|
|
|
|
|
iface.Set("AutoHideCursor", m_LocalCoreStartupParameter.bAutoHideCursor);
|
|
|
|
|
iface.Set("Theme", m_LocalCoreStartupParameter.iTheme);
|
|
|
|
|
iface.Set("MainWindowPosX", m_LocalCoreStartupParameter.iPosX);
|
|
|
|
|
iface.Set("MainWindowPosY", m_LocalCoreStartupParameter.iPosY);
|
|
|
|
|
iface.Set("MainWindowWidth", m_LocalCoreStartupParameter.iWidth);
|
|
|
|
|
iface.Set("MainWindowHeight", m_LocalCoreStartupParameter.iHeight);
|
|
|
|
|
iface.Set("Language", m_InterfaceLanguage);
|
|
|
|
|
iface.Set("ShowToolbar", m_InterfaceToolbar);
|
|
|
|
|
iface.Set("ShowStatusbar", m_InterfaceStatusbar);
|
|
|
|
|
iface.Set("ShowLogWindow", m_InterfaceLogWindow);
|
|
|
|
|
iface.Set("ShowConsole", m_InterfaceConsole);
|
2010-04-08 16:59:35 +00:00
|
|
|
|
2010-04-12 01:33:10 +00:00
|
|
|
// Hotkeys
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& hotkeys = ini["Hotkeys"];
|
2010-04-25 20:10:16 +00:00
|
|
|
for (int i = HK_FULLSCREEN; i < NUM_HOTKEYS; i++)
|
|
|
|
|
{
|
2010-06-03 04:55:39 +00:00
|
|
|
hotkeys.Set(g_HKData[i].IniText, m_LocalCoreStartupParameter.iHotkey[i]);
|
|
|
|
|
hotkeys.Set((std::string(g_HKData[i].IniText) + "Modifier").c_str(),
|
2010-04-25 20:10:16 +00:00
|
|
|
m_LocalCoreStartupParameter.iHotkeyModifier[i]);
|
|
|
|
|
}
|
2010-04-12 01:33:10 +00:00
|
|
|
|
|
|
|
|
// Display
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& display = ini["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);
|
2010-04-12 01:33:10 +00:00
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
// Game List Control
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& gamelist = ini["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);
|
|
|
|
|
gamelist.Set("ListFrance", m_ListFrance);
|
|
|
|
|
gamelist.Set("ListItaly", m_ListItaly);
|
|
|
|
|
gamelist.Set("ListKorea", m_ListKorea);
|
|
|
|
|
gamelist.Set("ListTaiwan", m_ListTaiwan);
|
|
|
|
|
gamelist.Set("ListUnknown", m_ListUnknown);
|
2010-04-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
// Core
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& core = ini["Core"];
|
|
|
|
|
core.Set("HLE_BS2", m_LocalCoreStartupParameter.bHLE_BS2);
|
|
|
|
|
core.Set("CPUCore", m_LocalCoreStartupParameter.iCPUCore);
|
|
|
|
|
core.Set("CPUThread", m_LocalCoreStartupParameter.bCPUThread);
|
|
|
|
|
core.Set("DSPThread", m_LocalCoreStartupParameter.bDSPThread);
|
|
|
|
|
core.Set("SkipIdle", m_LocalCoreStartupParameter.bSkipIdle);
|
|
|
|
|
core.Set("LockThreads", m_LocalCoreStartupParameter.bLockThreads);
|
|
|
|
|
core.Set("DefaultGCM", m_LocalCoreStartupParameter.m_strDefaultGCM);
|
|
|
|
|
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("MemcardA", m_strMemoryCardA);
|
|
|
|
|
core.Set("MemcardB", m_strMemoryCardB);
|
|
|
|
|
core.Set("SlotA", m_EXIDevice[0]);
|
|
|
|
|
core.Set("SlotB", m_EXIDevice[1]);
|
|
|
|
|
core.Set("SerialPort1", m_EXIDevice[2]);
|
2010-04-08 16:59:35 +00:00
|
|
|
char sidevicenum[16];
|
|
|
|
|
for (int i = 0; i < 4; ++i)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2010-04-08 16:59:35 +00:00
|
|
|
sprintf(sidevicenum, "SIDevice%i", i);
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Set(sidevicenum, m_SIDevice[i]);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Set("WiiSDCard", m_WiiSDCard);
|
|
|
|
|
core.Set("WiiKeyboard", m_WiiKeyboard);
|
|
|
|
|
core.Set("RunCompareServer", m_LocalCoreStartupParameter.bRunCompareServer);
|
|
|
|
|
core.Set("RunCompareClient", m_LocalCoreStartupParameter.bRunCompareClient);
|
|
|
|
|
core.Set("FrameLimit", m_Framelimit);
|
|
|
|
|
core.Set("UseFPS", b_UseFPS);
|
2009-09-14 06:26:49 +00:00
|
|
|
|
2010-04-08 16:59:35 +00:00
|
|
|
// Plugins
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Set("GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin);
|
|
|
|
|
core.Set("DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin);
|
|
|
|
|
core.Set("WiiMotePlugin",m_LocalCoreStartupParameter.m_strWiimotePlugin[0]);
|
2010-04-08 16:59:35 +00:00
|
|
|
|
|
|
|
|
ini.Save(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
2009-09-14 06:26:49 +00:00
|
|
|
m_SYSCONF->Save();
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void SConfig::LoadSettings()
|
2009-09-14 06:26:49 +00:00
|
|
|
{
|
2010-02-02 21:56:29 +00:00
|
|
|
INFO_LOG(BOOT, "Loading Settings from %s", File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
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));
|
|
|
|
|
|
2009-02-26 07:24:50 +00:00
|
|
|
std::string PluginsDir = File::GetPluginsDirectory();
|
2008-12-08 09:53:38 +00:00
|
|
|
|
2009-02-28 23:21:51 +00:00
|
|
|
// Hard coded default
|
2008-12-08 09:53:38 +00:00
|
|
|
m_DefaultGFXPlugin = PluginsDir + DEFAULT_GFX_PLUGIN;
|
|
|
|
|
m_DefaultDSPPlugin = PluginsDir + DEFAULT_DSP_PLUGIN;
|
|
|
|
|
m_DefaultWiiMotePlugin = PluginsDir + DEFAULT_WIIMOTE_PLUGIN;
|
2009-02-28 23:21:51 +00:00
|
|
|
|
2009-01-14 16:36:43 +00:00
|
|
|
// General
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& general = ini["General"];
|
|
|
|
|
general.Get("LastFilename", &m_LastFilename);
|
2008-12-08 05:30:24 +00:00
|
|
|
|
|
|
|
|
m_ISOFolder.clear();
|
|
|
|
|
|
2010-06-03 04:55:39 +00:00
|
|
|
unsigned int numGCMPaths;
|
|
|
|
|
general.Get("GCMPathes", &numGCMPaths, 0);
|
|
|
|
|
for (unsigned int i = 0; i < numGCMPaths; i++)
|
2008-12-08 05:30:24 +00:00
|
|
|
{
|
2010-06-03 04:55:39 +00:00
|
|
|
TCHAR tmp[16];
|
|
|
|
|
sprintf(tmp, "GCMPath%i", i);
|
|
|
|
|
std::string tmpPath;
|
|
|
|
|
general.Get(tmp, &tmpPath, "");
|
|
|
|
|
m_ISOFolder.push_back(tmpPath);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2009-04-05 06:46:18 +00:00
|
|
|
|
2010-06-03 04:55:39 +00:00
|
|
|
general.Get("RecersiveGCMPaths", &m_RecursiveISOFolder, false);
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{
|
2009-01-14 16:36:43 +00:00
|
|
|
// Interface
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& iface = ini["Interface"];
|
|
|
|
|
iface.Get("ConfirmStop", &m_LocalCoreStartupParameter.bConfirmStop, false);
|
|
|
|
|
iface.Get("UsePanicHandlers", &m_LocalCoreStartupParameter.bUsePanicHandlers, true);
|
|
|
|
|
iface.Get("HideCursor", &m_LocalCoreStartupParameter.bHideCursor, false);
|
|
|
|
|
iface.Get("AutoHideCursor", &m_LocalCoreStartupParameter.bAutoHideCursor, false);
|
|
|
|
|
iface.Get("Theme", &m_LocalCoreStartupParameter.iTheme, 0);
|
|
|
|
|
iface.Get("MainWindowPosX", &m_LocalCoreStartupParameter.iPosX, 100);
|
|
|
|
|
iface.Get("MainWindowPosY", &m_LocalCoreStartupParameter.iPosY, 100);
|
|
|
|
|
iface.Get("MainWindowWidth", &m_LocalCoreStartupParameter.iWidth, 800);
|
|
|
|
|
iface.Get("MainWindowHeight", &m_LocalCoreStartupParameter.iHeight, 600);
|
|
|
|
|
iface.Get("Language", (int*)&m_InterfaceLanguage, 0);
|
|
|
|
|
iface.Get("ShowToolbar", &m_InterfaceToolbar, true);
|
|
|
|
|
iface.Get("ShowStatusbar", &m_InterfaceStatusbar, true);
|
|
|
|
|
iface.Get("ShowLogWindow", &m_InterfaceLogWindow, false);
|
|
|
|
|
iface.Get("ShowConsole", &m_InterfaceConsole, false);
|
2009-01-04 21:53:41 +00:00
|
|
|
|
2010-04-12 01:33:10 +00:00
|
|
|
// Hotkeys
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& hotkeys = ini["Hotkeys"];
|
2010-04-25 20:10:16 +00:00
|
|
|
for (int i = HK_FULLSCREEN; i < NUM_HOTKEYS; i++)
|
|
|
|
|
{
|
2010-06-03 04:55:39 +00:00
|
|
|
hotkeys.Get(g_HKData[i].IniText,
|
2010-04-25 20:10:16 +00:00
|
|
|
&m_LocalCoreStartupParameter.iHotkey[i], g_HKData[i].DefaultKey);
|
2010-06-03 04:55:39 +00:00
|
|
|
hotkeys.Get((std::string(g_HKData[i].IniText) + "Modifier").c_str(),
|
2010-04-25 20:10:16 +00:00
|
|
|
&m_LocalCoreStartupParameter.iHotkeyModifier[i], g_HKData[i].DefaultModifier);
|
|
|
|
|
}
|
2010-04-12 01:33:10 +00:00
|
|
|
|
|
|
|
|
// Display
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& display = ini["Display"];
|
|
|
|
|
display.Get("Fullscreen", &m_LocalCoreStartupParameter.bFullscreen, false);
|
|
|
|
|
display.Get("FullscreenResolution", &m_LocalCoreStartupParameter.strFullscreenResolution, "640x480");
|
|
|
|
|
display.Get("RenderToMain", &m_LocalCoreStartupParameter.bRenderToMain, false);
|
|
|
|
|
display.Get("RenderWindowXPos", &m_LocalCoreStartupParameter.iRenderWindowXPos, 0);
|
|
|
|
|
display.Get("RenderWindowYPos", &m_LocalCoreStartupParameter.iRenderWindowYPos, 0);
|
|
|
|
|
display.Get("RenderWindowWidth", &m_LocalCoreStartupParameter.iRenderWindowWidth, 640);
|
|
|
|
|
display.Get("RenderWindowHeight", &m_LocalCoreStartupParameter.iRenderWindowHeight, 480);
|
2010-04-12 01:33:10 +00:00
|
|
|
|
2009-04-28 02:30:50 +00:00
|
|
|
// Game List Control
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& gamelist = ini["GameList"];
|
|
|
|
|
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("ListFrance", &m_ListFrance, true);
|
|
|
|
|
gamelist.Get("ListItaly", &m_ListItaly, true);
|
|
|
|
|
gamelist.Get("ListKorea", &m_ListKorea, true);
|
|
|
|
|
gamelist.Get("ListTaiwan", &m_ListTaiwan, true);
|
|
|
|
|
gamelist.Get("ListUnknown", &m_ListUnknown, true);
|
2010-01-11 05:07:56 +00:00
|
|
|
|
2008-12-23 11:24:11 +00:00
|
|
|
// Core
|
2010-06-03 04:55:39 +00:00
|
|
|
Section& core = ini["Core"];
|
|
|
|
|
core.Get("HLE_BS2", &m_LocalCoreStartupParameter.bHLE_BS2, true);
|
|
|
|
|
core.Get("CPUCore", &m_LocalCoreStartupParameter.iCPUCore, 1);
|
|
|
|
|
core.Get("DSPThread", &m_LocalCoreStartupParameter.bDSPThread, false);
|
|
|
|
|
core.Get("CPUThread", &m_LocalCoreStartupParameter.bCPUThread, true);
|
|
|
|
|
core.Get("SkipIdle", &m_LocalCoreStartupParameter.bSkipIdle, true);
|
|
|
|
|
core.Get("LockThreads", &m_LocalCoreStartupParameter.bLockThreads, false);
|
|
|
|
|
core.Get("DefaultGCM", &m_LocalCoreStartupParameter.m_strDefaultGCM);
|
|
|
|
|
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("MemcardA", &m_strMemoryCardA);
|
|
|
|
|
core.Get("MemcardB", &m_strMemoryCardB);
|
|
|
|
|
core.Get("SlotA", (int*)&m_EXIDevice[0], EXIDEVICE_MEMORYCARD_A);
|
|
|
|
|
core.Get("SlotB", (int*)&m_EXIDevice[1], EXIDEVICE_MEMORYCARD_B);
|
|
|
|
|
core.Get("SerialPort1", (int*)&m_EXIDevice[2], EXIDEVICE_NONE);
|
|
|
|
|
core.Get("ProfiledReJIT", &m_LocalCoreStartupParameter.bJITProfiledReJIT, false);
|
2009-02-02 22:29:33 +00:00
|
|
|
char sidevicenum[16];
|
|
|
|
|
for (int i = 0; i < 4; ++i)
|
|
|
|
|
{
|
|
|
|
|
sprintf(sidevicenum, "SIDevice%i", i);
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Get(sidevicenum, (u32*)&m_SIDevice[i], i==0 ? SI_GC_CONTROLLER:SI_NONE);
|
2009-02-02 22:29:33 +00:00
|
|
|
}
|
2008-12-23 11:24:11 +00:00
|
|
|
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Get("WiiSDCard", &m_WiiSDCard, false);
|
|
|
|
|
core.Get("WiiKeyboard", &m_WiiKeyboard, false);
|
|
|
|
|
core.Get("RunCompareServer", &m_LocalCoreStartupParameter.bRunCompareServer, false);
|
|
|
|
|
core.Get("RunCompareClient", &m_LocalCoreStartupParameter.bRunCompareClient, false);
|
|
|
|
|
core.Get("TLBHack", &m_LocalCoreStartupParameter.iTLBHack, 0);
|
|
|
|
|
core.Get("FrameLimit", &m_Framelimit, 1); // auto frame limit by default
|
|
|
|
|
core.Get("UseFPS", &b_UseFPS, false); // use vps as default
|
2008-12-09 05:37:15 +00:00
|
|
|
|
2008-12-23 11:24:11 +00:00
|
|
|
// Plugins
|
2010-06-03 04:55:39 +00:00
|
|
|
core.Get("GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str());
|
|
|
|
|
core.Get("DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str());
|
|
|
|
|
core.Get("WiiMotePlugin", &m_LocalCoreStartupParameter.m_strWiimotePlugin[0], m_DefaultWiiMotePlugin.c_str());
|
2010-03-27 04:21:19 +00:00
|
|
|
|
|
|
|
|
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2009-09-14 06:26:49 +00:00
|
|
|
|
|
|
|
|
m_SYSCONF = new SysConf();
|
2008-12-08 05:30:24 +00:00
|
|
|
}
|
2010-03-30 11:53:41 +00:00
|
|
|
void SConfig::LoadSettingsWii()
|
|
|
|
|
{
|
|
|
|
|
IniFile ini;
|
|
|
|
|
//Wiimote configs
|
|
|
|
|
ini.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "Dolphin.ini").c_str());
|
|
|
|
|
for (int i = 0; i < 4; i++)
|
|
|
|
|
{
|
|
|
|
|
char SectionName[32];
|
|
|
|
|
sprintf(SectionName, "Wiimote%i", i + 1);
|
2010-06-03 04:55:39 +00:00
|
|
|
ini[SectionName].Get("AutoReconnectRealWiimote", &m_WiiAutoReconnect[i], false);
|
2010-03-30 11:53:41 +00:00
|
|
|
}
|
2010-04-25 20:10:16 +00:00
|
|
|
}
|