Trying to make gameini support some gl options

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2687 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2009-03-20 11:51:22 +00:00
parent eff7b1aa14
commit f22af37320
13 changed files with 85 additions and 26 deletions

View File

@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _CONFIG_H
#define _CONFIG_H
#ifndef _PLUGIN_DSP_HLE_CONFIG_H
#define _PLUGIN_DSP_HLE_CONFIG_H
#include <string>
@ -36,5 +36,5 @@ struct CConfig
extern CConfig g_Config;
#endif
#endif // _PLUGIN_DSP_HLE_CONFIG_H

View File

@ -19,6 +19,7 @@
#include "Common.h"
#include "IniFile.h"
#include "Config.h"
#include "ConfigManager.h"
Config g_Config;
@ -79,6 +80,27 @@ void Config::Load()
iniFile.Get("Hacks", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
}
void Config::GameIniLoad() {
IniFile *iniFile = ((struct SConfig *)globals->config)->m_LocalCoreStartupParameter.gameIni;
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", "ProjectionHax1"))
iniFile->Get("Video", "ProjectionHax1", &bProjectionHax1, 0);
if (iniFile->Exists("Video", "EFBToTextureEnable"))
iniFile->Get("Video", "EFBToTextureEnable", &bCopyEFBToRAM, 0);
}
void Config::Save()
{
IniFile iniFile;
@ -125,3 +147,4 @@ void Config::Save()
iniFile.Save(FULL_CONFIG_DIR "gfx_opengl.ini");
}

View File

@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _CONFIG_H
#define _CONFIG_H
#ifndef _PLUGIN_VIDEOOGL_CONFIG_H
#define _PLUGIN_VIDEOOGL_CONFIG_H
#include "Common.h"
@ -43,6 +43,7 @@ struct Config
{
Config();
void Load();
void GameIniLoad();
void Save();
// General
@ -104,4 +105,4 @@ private:
extern Config g_Config;
#endif // _CONFIG_H
#endif // _PLUGIN_VIDEOOGL_CONFIG_H

View File

@ -23,11 +23,9 @@
#include "VideoCommon.h"
#include "pluginspecs_video.h"
#include "ConfigManager.h"
// A global plugin specification
extern PLUGIN_GLOBALS* globals;
//void OpenConsole();
//void CloseConsole();
#endif // _GLOBALS_H

View File

@ -228,6 +228,8 @@ void Initialize(void *init)
InitXFBConvTables();
g_Config.Load();
g_Config.GameIniLoad();
if (!OpenGL_Create(g_VideoInitialize, 640, 480)) // 640x480 will be the default if all else fails
{
g_VideoInitialize.pLog("Renderer::Create failed\n", TRUE);

View File

@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _CONFIG_H
#define _CONFIG_H
#ifndef _PLUGIN_WIIMOTE_CONFIG_H
#define _PLUGIN_WIIMOTE_CONFIG_H
struct Config
@ -91,4 +91,4 @@ struct Config
extern Config g_Config;
#endif // _CONFIG_H
#endif // _PLUGIN_WIIMOTE_CONFIG_H

View File

@ -15,8 +15,8 @@
// Official SVN repository and contact information can be found at
// http://code.google.com/p/dolphin-emu/
#ifndef _CONFIG_H
#define _CONFIG_H
#ifndef _PLUGIN_NJOY_SDL_CONFIG_H
#define _PLUGIN_NJOY_SDL_CONFIG_H
struct Config
{
@ -38,4 +38,4 @@ struct Config
extern Config g_Config;
#endif // _CONFIG_H
#endif // _PLUGIN_NJOY_SDL_CONFIG_H