diff options
| author | LPFaint99 <lpfaint99@gmail.com> | 2009-09-15 08:13:45 +0000 |
|---|---|---|
| committer | LPFaint99 <lpfaint99@gmail.com> | 2009-09-15 08:13:45 +0000 |
| commit | ca7a5b36dc1e3fc8332ea26d06a0a69e20a32a85 (patch) | |
| tree | e05b5cccde0324e96b8d568961c062c9638ed818 /Source/Core/VideoCommon | |
| parent | b7d6259405d8acce302dab74297004d906a94454 (diff) | |
only load gameini settings if they exist
change D3D to use char[] for resolution settings in ini
warning fixes for FrameAui.cpp
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4273 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/Src/VideoConfig.cpp | 37 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/Src/VideoConfig.h | 4 |
2 files changed, 21 insertions, 20 deletions
diff --git a/Source/Core/VideoCommon/Src/VideoConfig.cpp b/Source/Core/VideoCommon/Src/VideoConfig.cpp index df54fa146a..239c527134 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.cpp +++ b/Source/Core/VideoCommon/Src/VideoConfig.cpp @@ -95,9 +95,6 @@ void VideoConfig::Load(const char *ini_file) iniFile.Get("Hardware", "Adapter", &iAdapter, 0); if (iAdapter == -1) iAdapter = 0; - // iniFile.Get("Hardware", "WindowedRes", &iWindowedRes, 0); - iniFile.Get("Hardware", "VSync", &bVsync, 0); - // iniFile.Get("Hardware", "FullscreenRes", &iFSResolution, 0); iniFile.Get("Hardware", "SimpleFB", &bSimpleFB, false); // Load common settings @@ -111,16 +108,27 @@ void VideoConfig::GameIniLoad(const char *ini_file) { 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); + + 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); } void VideoConfig::Save(const char *ini_file) @@ -174,9 +182,6 @@ void VideoConfig::Save(const char *ini_file) iniFile.Set("Hacks", "ProjectionHack", iPhackvalue); iniFile.Set("Hardware", "Adapter", iAdapter); - // iniFile.Set("Hardware", "WindowedRes", iWindowedRes); - iniFile.Set("Hardware", "VSync", bVsync); - // iniFile.Set("Hardware", "FullscreenRes", iFSResolution); iniFile.Set("Hardware", "SimpleFB", bSimpleFB); iniFile.Save(ini_file); diff --git a/Source/Core/VideoCommon/Src/VideoConfig.h b/Source/Core/VideoCommon/Src/VideoConfig.h index 47b28e43a7..3b4224bb86 100644 --- a/Source/Core/VideoCommon/Src/VideoConfig.h +++ b/Source/Core/VideoCommon/Src/VideoConfig.h @@ -123,10 +123,6 @@ struct VideoConfig // D3D only config, mostly to be merged into the above int iAdapter; - int iWindowedRes; - int iFSResolution; - - bool bVsync; // With this enabled, the plugin renders directly to the backbuffer. Many features are // disabled but it might be faster on really old GPUs. |
