From ac83588c3a758d871c482e1cf5ac45dc1fdcd673 Mon Sep 17 00:00:00 2001 From: nakeee Date: Sun, 7 Sep 2008 20:29:31 +0000 Subject: continue changing src to Src git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@474 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DolphinWX/src/Config.cpp | 122 ----------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 Source/Core/DolphinWX/src/Config.cpp (limited to 'Source/Core/DolphinWX/src/Config.cpp') diff --git a/Source/Core/DolphinWX/src/Config.cpp b/Source/Core/DolphinWX/src/Config.cpp deleted file mode 100644 index c26ccd5fd3..0000000000 --- a/Source/Core/DolphinWX/src/Config.cpp +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (C) 2003-2008 Dolphin Project. - -// 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 - -#include "Globals.h" -#include "Common.h" -#include "IniFile.h" -#include "Config.h" - -SConfig SConfig::m_Instance; - - -SConfig::SConfig() -{ - LoadSettings(); -} - - -SConfig::~SConfig() -{ - SaveSettings(); -} - - -void SConfig::SaveSettings() -{ - IniFile ini; - ini.Load("Dolphin.ini"); // yes we must load first to not kill unknown stuff - - // misc - { - ini.Set("General", "LastFilename", m_LastFilename); - - // ISO folders - ini.Set("General", "GCMPathes", (int)m_ISOFolder.size()); - - for (size_t i = 0; i < m_ISOFolder.size(); i++) - { - TCHAR tmp[16]; - sprintf(tmp, "GCMPath%i", (int)i); - ini.Set("General", tmp, m_ISOFolder[i]); - } - } - - // core - { - ini.Set("Core", "GFXPlugin", m_LocalCoreStartupParameter.m_strVideoPlugin); - ini.Set("Core", "DSPPlugin", m_LocalCoreStartupParameter.m_strDSPPlugin); - ini.Set("Core", "PadPlugin", m_LocalCoreStartupParameter.m_strPadPlugin); - - ini.Set("Core", "HLEBios", m_LocalCoreStartupParameter.bHLEBios); - ini.Set("Core", "UseDynarec", m_LocalCoreStartupParameter.bUseJIT); - ini.Set("Core", "UseDualCore", m_LocalCoreStartupParameter.bUseDualCore); - ini.Set("Core", "LockThreads", m_LocalCoreStartupParameter.bLockThreads); - ini.Set("Core", "DefaultGCM", m_LocalCoreStartupParameter.m_strDefaultGCM); - ini.Set("Core", "OptimizeQuantizers", m_LocalCoreStartupParameter.bOptimizeQuantizers); - } - - ini.Save("Dolphin.ini"); -} - - -void SConfig::LoadSettings() -{ - IniFile ini; - ini.Load("Dolphin.ini"); - - // hard coded default plugin - { - ini.Get("Default", "GFXPlugin", &m_DefaultGFXPlugin); - ini.Get("Default", "DSPPlugin", &m_DefaultDSPPlugin); - ini.Get("Default", "PadPlugin", &m_DefaultPADPlugin); - } - - // misc - { - ini.Get("General", "LastFilename", &m_LastFilename); - - m_ISOFolder.clear(); - int numGCMPaths; - - if (ini.Get("General", "GCMPathes", &numGCMPaths, 0)) - { - for (int i = 0; i < numGCMPaths; i++) - { - TCHAR tmp[16]; - sprintf(tmp, "GCMPath%i", i); - std::string tmpPath; - ini.Get("General", tmp, &tmpPath, ""); - m_ISOFolder.push_back(tmpPath); - } - } - } - - // core - { - ini.Get("Core", "GFXPlugin", &m_LocalCoreStartupParameter.m_strVideoPlugin, m_DefaultGFXPlugin.c_str()); - ini.Get("Core", "DSPPlugin", &m_LocalCoreStartupParameter.m_strDSPPlugin, m_DefaultDSPPlugin.c_str()); - ini.Get("Core", "PadPlugin", &m_LocalCoreStartupParameter.m_strPadPlugin, m_DefaultPADPlugin.c_str()); - - ini.Get("Core", "HLEBios", &m_LocalCoreStartupParameter.bHLEBios, true); - ini.Get("Core", "UseDynarec", &m_LocalCoreStartupParameter.bUseJIT, true); - ini.Get("Core", "UseDualCore", &m_LocalCoreStartupParameter.bUseDualCore, false); - ini.Get("Core", "LockThreads", &m_LocalCoreStartupParameter.bLockThreads, true); - ini.Get("Core", "OptimizeQuantizers", &m_LocalCoreStartupParameter.bOptimizeQuantizers, true); - } -} -- cgit v1.2.3