mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
* GUI Video-Settings changes:
- Removed recent ghanges about separate per-game Video Settings - Added "One Window 3-State Support" (very close to full implementation) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7391 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -27,7 +27,6 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "VideoCommon.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -62,17 +61,22 @@ class IniFile;
|
||||
// NEVER inherit from this class.
|
||||
struct VideoConfig
|
||||
{
|
||||
VideoConfig();
|
||||
void Load(const char *ini_file);
|
||||
|
||||
private:
|
||||
// According to new structure-design this member MUST BE private
|
||||
void GameIniLoad(const char *ini_file);
|
||||
|
||||
public:
|
||||
VideoConfig();
|
||||
// You can choose what "INI snapshot" you wish to load...
|
||||
// GameIni is loaded over MainIni file only if 'fileCheck' argument is passed with success
|
||||
void Load(const char *main_ini_file, bool fileCheck = false, const char *game_ini_file = "");
|
||||
|
||||
void VerifyValidity();
|
||||
void Save(const char *ini_file);
|
||||
void GameIniSave(const char* game_ini);
|
||||
void GameIniSave(const char* default_ini, const char* game_ini);
|
||||
void UpdateProjectionHack();
|
||||
|
||||
// some hacks used for per-game config
|
||||
void SetAllUndetermined();
|
||||
|
||||
// General
|
||||
bool bVSync;
|
||||
|
||||
@ -81,7 +85,7 @@ struct VideoConfig
|
||||
int iAspectRatio;
|
||||
bool bCrop; // Aspect ratio controls.
|
||||
bool bUseXFB;
|
||||
bool bUseRealXFB;
|
||||
bool bUseRealXFB; // joined to radio button
|
||||
bool bUseNativeMips;
|
||||
|
||||
// OpenCL/OpenMP
|
||||
@ -113,7 +117,7 @@ struct VideoConfig
|
||||
|
||||
// Utility
|
||||
bool bDumpTextures;
|
||||
bool bHiresTextures;
|
||||
bool bHiresTextures;
|
||||
bool bDumpEFBTarget;
|
||||
bool bDumpFrames;
|
||||
bool bUseFFV1;
|
||||
@ -123,15 +127,16 @@ struct VideoConfig
|
||||
int iAnaglyphFocalAngle;
|
||||
bool b3DVision;
|
||||
|
||||
|
||||
// Hacks
|
||||
bool bEFBAccessEnable;
|
||||
bool bDlistCachingEnable;
|
||||
bool bDlistCachingEnable;
|
||||
|
||||
bool bEFBCopyEnable;
|
||||
bool bEFBCopyCacheEnable;
|
||||
bool bEFBEmulateFormatChanges;
|
||||
bool bOSDHotKey;
|
||||
bool bCopyEFBToTexture;
|
||||
bool bCopyEFBToTexture; // joined to radio button
|
||||
bool bCopyEFBScaled;
|
||||
bool bSafeTextureCache;
|
||||
int iSafeTextureCache_ColorSamples;
|
||||
@ -152,8 +157,64 @@ struct VideoConfig
|
||||
// D3D only config, mostly to be merged into the above
|
||||
int iAdapter;
|
||||
|
||||
// UI Controls state
|
||||
struct
|
||||
{
|
||||
// IMPORTANT: each member inside this struct MUST HAVE same name corresponding to data member
|
||||
bool bVSync;
|
||||
bool bWidescreenHack;
|
||||
bool iAspectRatio;
|
||||
bool bCrop;
|
||||
bool bUseXFB;
|
||||
bool bUseNativeMips;
|
||||
bool bEnableOpenCL;
|
||||
bool iMultisampleMode;
|
||||
bool iEFBScale;
|
||||
bool bForceFiltering;
|
||||
bool iMaxAnisotropy;
|
||||
bool bShowFPS;
|
||||
bool bShowInputDisplay;
|
||||
bool bOverlayStats;
|
||||
bool bOverlayProjStats;
|
||||
bool bTexFmtOverlayEnable;
|
||||
bool bTexFmtOverlayCenter;
|
||||
bool bShowEFBCopyRegions;
|
||||
bool bWireFrame;
|
||||
bool bDisableLighting;
|
||||
bool bDisableTexturing;
|
||||
bool bDstAlphaPass;
|
||||
bool bDisableFog;
|
||||
bool bDumpTextures;
|
||||
bool bHiresTextures;
|
||||
bool bDumpEFBTarget;
|
||||
bool bDumpFrames;
|
||||
bool bUseFFV1;
|
||||
bool bFreeLook;
|
||||
bool bAnaglyphStereo;
|
||||
bool b3DVision;
|
||||
bool iAnaglyphStereoSeparation;
|
||||
bool iAnaglyphFocalAngle;
|
||||
bool bEFBAccessEnable;
|
||||
bool bOMPDecoder;
|
||||
bool bDlistCachingEnable;
|
||||
bool bEFBCopyEnable;
|
||||
bool bEFBCopyCacheEnable;
|
||||
bool bEFBEmulateFormatChanges;
|
||||
bool bOSDHotKey;
|
||||
bool bCopyEFBScaled;
|
||||
bool bSafeTextureCache;
|
||||
bool bZTPSpeedHack;
|
||||
bool bEnablePixelLighting;
|
||||
bool bEnablePerPixelDepth;
|
||||
bool iLog;
|
||||
bool iSaveTargetId;
|
||||
bool iCompileDLsLevel;
|
||||
bool bShowShaderErrors;
|
||||
bool iAdapter;
|
||||
} UI_State;
|
||||
|
||||
// Static config per API
|
||||
struct BackendInfo
|
||||
struct
|
||||
{
|
||||
API_TYPE APIType;
|
||||
|
||||
@ -167,29 +228,6 @@ struct VideoConfig
|
||||
bool bSupportsFormatReinterpretation;
|
||||
bool bSupportsPixelLighting;
|
||||
} backend_info;
|
||||
|
||||
// haxhaxhax
|
||||
static bool IsUndetermined(const bool& val)
|
||||
{
|
||||
// lul, storing a u8 inside a bool
|
||||
return (*reinterpret_cast<const u8*>(&val) > 1);
|
||||
}
|
||||
|
||||
static bool IsUndetermined(int val)
|
||||
{
|
||||
return (val < 0);
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
template <typename T>
|
||||
void SetIfDetermined(IniFile::Section& sect, const char* key, const T& value)
|
||||
{
|
||||
if (IsUndetermined(value))
|
||||
sect.Delete(key);
|
||||
else
|
||||
sect.Set(key, value);
|
||||
}
|
||||
};
|
||||
|
||||
extern VideoConfig g_Config;
|
||||
|
Reference in New Issue
Block a user