mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Moved per-game graphics configuration to the game-list right click menu. It will be too difficult to make the "profiles" drop-down thing work with 3-state vs 2-state checkboxes. The per-game settings now have "undetermined" states, except for the radio buttons(I'll fix that later). It's super hacky right now. Video config (probably all config stuff) could be redone.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7386 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -27,6 +27,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "VideoCommon.h"
|
||||
#include "IniFile.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
@ -66,9 +67,12 @@ struct VideoConfig
|
||||
void GameIniLoad(const char *ini_file);
|
||||
void VerifyValidity();
|
||||
void Save(const char *ini_file);
|
||||
void GameIniSave(const char* default_ini, const char* game_ini);
|
||||
void GameIniSave(const char* game_ini);
|
||||
void UpdateProjectionHack();
|
||||
|
||||
// some hacks used for per-game config
|
||||
void SetAllUndetermined();
|
||||
|
||||
// General
|
||||
bool bVSync;
|
||||
|
||||
@ -149,7 +153,7 @@ struct VideoConfig
|
||||
int iAdapter;
|
||||
|
||||
// Static config per API
|
||||
struct
|
||||
struct BackendInfo
|
||||
{
|
||||
API_TYPE APIType;
|
||||
|
||||
@ -159,11 +163,33 @@ struct VideoConfig
|
||||
|
||||
bool bUseRGBATextures; // used for D3D11 in TextureCache
|
||||
bool bSupports3DVision;
|
||||
bool bAllowSignedBytes; // D3D9 doesn't support signed bytes (?)
|
||||
bool bSupportsDualSourceBlend; // only supported by D3D11 and OpenGL
|
||||
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