D3D: load game ini options, to be used later.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4249 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
39465e5fd8
commit
f0d1278eff
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
|
#include "globals.h"
|
||||||
#include "../../../Core/Core/Src/ConfigManager.h" // FIXME
|
#include "../../../Core/Core/Src/ConfigManager.h" // FIXME
|
||||||
|
|
||||||
Config g_Config;
|
Config g_Config;
|
||||||
|
@ -82,3 +83,41 @@ void Config::Save()
|
||||||
iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
|
iniFile.Set("Enhancements", "ForceMaxAniso", bForceMaxAniso);
|
||||||
iniFile.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
|
iniFile.Save(FULL_CONFIG_DIR "gfx_dx9.ini");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Config::GameIniLoad()
|
||||||
|
{
|
||||||
|
// This function is copied from OGL plugin, slightly modified.
|
||||||
|
IniFile *iniFile = ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.gameIni;
|
||||||
|
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, bSafeTextureCache);
|
||||||
|
|
||||||
|
//if (iniFile->Exists("Video", "MSAA"))
|
||||||
|
// iniFile->Get("Video", "MSAA", &iMultisampleMode, 0);
|
||||||
|
|
||||||
|
if (iniFile->Exists("Video", "DstAlphaPass"))
|
||||||
|
iniFile->Get("Video", "DstAlphaPass", &bDstAlphaPass, bDstAlphaPass);
|
||||||
|
|
||||||
|
if (iniFile->Exists("Video", "UseXFB"))
|
||||||
|
iniFile->Get("Video", "UseXFB", &bUseXFB, 0);
|
||||||
|
|
||||||
|
if (iniFile->Exists("Video", "ProjectionHack"))
|
||||||
|
iniFile->Get("Video", "ProjectionHack", &iPhackvalue, 0);
|
||||||
|
}
|
||||||
|
|
|
@ -25,6 +25,7 @@ struct Config
|
||||||
Config();
|
Config();
|
||||||
void Load();
|
void Load();
|
||||||
void Save();
|
void Save();
|
||||||
|
void GameIniLoad();
|
||||||
|
|
||||||
int iAdapter;
|
int iAdapter;
|
||||||
int iFSResolution;
|
int iFSResolution;
|
||||||
|
@ -60,6 +61,14 @@ struct Config
|
||||||
bool bTexFmtOverlayEnable;
|
bool bTexFmtOverlayEnable;
|
||||||
bool bTexFmtOverlayCenter;
|
bool bTexFmtOverlayCenter;
|
||||||
|
|
||||||
|
// from game INI file, import from OGL plugin
|
||||||
|
bool bSafeTextureCache;
|
||||||
|
bool bEFBCopyDisable;
|
||||||
|
bool bCopyEFBToRAM;
|
||||||
|
bool bDstAlphaPass;
|
||||||
|
bool bUseXFB;
|
||||||
|
int iPhackvalue;
|
||||||
|
|
||||||
std::string texDumpPath;
|
std::string texDumpPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -182,6 +182,7 @@ void UpdateFPSDisplay(const char *text)
|
||||||
bool Init()
|
bool Init()
|
||||||
{
|
{
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
|
g_Config.GameIniLoad();
|
||||||
|
|
||||||
if (initCount == 0)
|
if (initCount == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue