mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-06 16:18:58 +00:00
Kill some horribly ugly hackery :( It's just not right to pass entire IniFile objects across DLLs. Only POD (plain-old-data, like int, float, char, char[] etc) are safe to pass across DLL boundaries.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4257 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
700f2ff694
commit
512053fa5e
20 changed files with 87 additions and 149 deletions
|
@ -105,40 +105,20 @@ void Config::Load(const char *ini_file)
|
|||
SetEnableAlert(bTmp);
|
||||
}
|
||||
|
||||
void Config::GameIniLoad(IniFile *iniFile)
|
||||
void Config::GameIniLoad(const char *ini_file)
|
||||
{
|
||||
if (! iniFile)
|
||||
return;
|
||||
|
||||
if (iniFile->Exists("Video", "ForceFiltering"))
|
||||
iniFile->Get("Video", "ForceFiltering", &bForceFiltering, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "MaxAnisotropy"))
|
||||
iniFile->Get("Video", "MaxAnisotropy", &iMaxAnisotropy, 3); // NOTE - this is x in (1 << x)
|
||||
|
||||
if (iniFile->Exists("Video", "EFBCopyDisable"))
|
||||
iniFile->Get("Video", "EFBCopyDisable", &bEFBCopyDisable, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "EFBCopyDisableHotKey"))
|
||||
iniFile->Get("Video", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "EFBToRAMEnable"))
|
||||
iniFile->Get("Video", "EFBToRAMEnable", &bCopyEFBToRAM, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "SafeTextureCache"))
|
||||
iniFile->Get("Video", "SafeTextureCache", &bSafeTextureCache, false);
|
||||
|
||||
if (iniFile->Exists("Video", "MSAA"))
|
||||
iniFile->Get("Video", "MSAA", &iMultisampleMode, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "DstAlphaPass"))
|
||||
iniFile->Get("Video", "DstAlphaPass", &bDstAlphaPass, false);
|
||||
|
||||
if (iniFile->Exists("Video", "UseXFB"))
|
||||
iniFile->Get("Video", "UseXFB", &bUseXFB, 0);
|
||||
|
||||
if (iniFile->Exists("Video", "ProjectionHack"))
|
||||
iniFile->Get("Video", "ProjectionHack", &iPhackvalue, 0);
|
||||
IniFile iniFile;
|
||||
iniFile.Load(ini_file);
|
||||
iniFile.Get("Video", "ForceFiltering", &bForceFiltering, 0);
|
||||
iniFile.Get("Video", "MaxAnisotropy", &iMaxAnisotropy, 3); // NOTE - this is x in (1 << x)
|
||||
iniFile.Get("Video", "EFBCopyDisable", &bEFBCopyDisable, 0);
|
||||
iniFile.Get("Video", "EFBCopyDisableHotKey", &bEFBCopyDisableHotKey, 0);
|
||||
iniFile.Get("Video", "EFBToRAMEnable", &bCopyEFBToRAM, 0);
|
||||
iniFile.Get("Video", "SafeTextureCache", &bSafeTextureCache, false);
|
||||
iniFile.Get("Video", "MSAA", &iMultisampleMode, 0);
|
||||
iniFile.Get("Video", "DstAlphaPass", &bDstAlphaPass, false);
|
||||
iniFile.Get("Video", "UseXFB", &bUseXFB, 0);
|
||||
iniFile.Get("Video", "ProjectionHack", &iPhackvalue, 0);
|
||||
}
|
||||
|
||||
void Config::Save(const char *ini_file)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue