2013-04-17 23:09:55 -04:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
|
// Licensed under GPLv2
|
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2009-09-13 08:21:35 +00:00
|
|
|
#include <cmath>
|
|
|
|
|
|
2014-09-07 20:06:58 -05:00
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "Common/FileUtil.h"
|
|
|
|
|
#include "Common/IniFile.h"
|
2014-07-06 15:33:08 -04:00
|
|
|
#include "Common/StringUtil.h"
|
2014-02-17 05:18:15 -05:00
|
|
|
#include "Core/ConfigManager.h"
|
|
|
|
|
#include "Core/Core.h"
|
|
|
|
|
#include "Core/Movie.h"
|
|
|
|
|
#include "VideoCommon/OnScreenDisplay.h"
|
|
|
|
|
#include "VideoCommon/VideoCommon.h"
|
2014-02-19 02:27:20 +01:00
|
|
|
#include "VideoCommon/VideoConfig.h"
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2009-09-13 10:18:01 +00:00
|
|
|
VideoConfig g_Config;
|
|
|
|
|
VideoConfig g_ActiveConfig;
|
2009-09-13 08:21:35 +00:00
|
|
|
|
2010-06-05 01:38:22 +00:00
|
|
|
void UpdateActiveConfig()
|
2009-09-13 08:21:35 +00:00
|
|
|
{
|
2013-05-21 19:20:22 -04:00
|
|
|
if (Movie::IsPlayingInput() && Movie::IsConfigSaved())
|
|
|
|
|
Movie::SetGraphicsConfig();
|
2009-09-13 08:21:35 +00:00
|
|
|
g_ActiveConfig = g_Config;
|
|
|
|
|
}
|
2008-12-08 05:25:12 +00:00
|
|
|
|
2009-09-13 10:18:01 +00:00
|
|
|
VideoConfig::VideoConfig()
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2009-09-06 15:11:21 +00:00
|
|
|
bRunning = false;
|
2014-06-18 15:04:23 +02:00
|
|
|
bFullscreen = false;
|
2010-11-21 14:47:28 +00:00
|
|
|
|
2010-04-04 22:52:27 +00:00
|
|
|
// Needed for the first frame, I think
|
|
|
|
|
fAspectRatioHackW = 1;
|
|
|
|
|
fAspectRatioHackH = 1;
|
2010-11-21 14:47:28 +00:00
|
|
|
|
|
|
|
|
// disable all features by default
|
|
|
|
|
backend_info.APIType = API_NONE;
|
2014-07-19 20:18:03 +02:00
|
|
|
backend_info.bSupportsExclusiveFullscreen = false;
|
2014-11-24 12:01:21 +01:00
|
|
|
|
|
|
|
|
// Game-specific stereoscopy settings
|
2014-12-24 23:06:44 +01:00
|
|
|
bStereoEFBMonoDepth = false;
|
2014-12-21 14:06:16 +01:00
|
|
|
iStereoDepthPercentage = 100;
|
2015-01-02 15:27:37 +01:00
|
|
|
iStereoConvergenceMinimum = 0;
|
2008-12-08 05:25:12 +00:00
|
|
|
}
|
|
|
|
|
|
2014-03-12 15:33:41 -04:00
|
|
|
void VideoConfig::Load(const std::string& ini_file)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2010-06-05 01:38:22 +00:00
|
|
|
IniFile iniFile;
|
2011-04-25 20:06:45 +00:00
|
|
|
iniFile.Load(ini_file);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* hardware = iniFile.GetOrCreateSection("Hardware");
|
|
|
|
|
hardware->Get("VSync", &bVSync, 0);
|
|
|
|
|
hardware->Get("Adapter", &iAdapter, 0);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* settings = iniFile.GetOrCreateSection("Settings");
|
|
|
|
|
settings->Get("wideScreenHack", &bWidescreenHack, false);
|
|
|
|
|
settings->Get("AspectRatio", &iAspectRatio, (int)ASPECT_AUTO);
|
|
|
|
|
settings->Get("Crop", &bCrop, false);
|
|
|
|
|
settings->Get("UseXFB", &bUseXFB, 0);
|
|
|
|
|
settings->Get("UseRealXFB", &bUseRealXFB, 0);
|
|
|
|
|
settings->Get("SafeTextureCacheColorSamples", &iSafeTextureCache_ColorSamples,128);
|
|
|
|
|
settings->Get("ShowFPS", &bShowFPS, false);
|
2014-07-09 17:03:17 +02:00
|
|
|
settings->Get("LogRenderTimeToFile", &bLogRenderTimeToFile, false);
|
2014-06-16 01:12:43 -04:00
|
|
|
settings->Get("OverlayStats", &bOverlayStats, false);
|
|
|
|
|
settings->Get("OverlayProjStats", &bOverlayProjStats, false);
|
|
|
|
|
settings->Get("ShowEFBCopyRegions", &bShowEFBCopyRegions, false);
|
|
|
|
|
settings->Get("DumpTextures", &bDumpTextures, 0);
|
|
|
|
|
settings->Get("HiresTextures", &bHiresTextures, 0);
|
|
|
|
|
settings->Get("DumpEFBTarget", &bDumpEFBTarget, 0);
|
|
|
|
|
settings->Get("FreeLook", &bFreeLook, 0);
|
|
|
|
|
settings->Get("UseFFV1", &bUseFFV1, 0);
|
|
|
|
|
settings->Get("EnablePixelLighting", &bEnablePixelLighting, 0);
|
|
|
|
|
settings->Get("FastDepthCalc", &bFastDepthCalc, true);
|
|
|
|
|
settings->Get("MSAA", &iMultisampleMode, 0);
|
|
|
|
|
settings->Get("EFBScale", &iEFBScale, (int) SCALE_1X); // native
|
|
|
|
|
settings->Get("DstAlphaPass", &bDstAlphaPass, false);
|
|
|
|
|
settings->Get("TexFmtOverlayEnable", &bTexFmtOverlayEnable, 0);
|
|
|
|
|
settings->Get("TexFmtOverlayCenter", &bTexFmtOverlayCenter, 0);
|
|
|
|
|
settings->Get("WireFrame", &bWireFrame, 0);
|
|
|
|
|
settings->Get("DisableFog", &bDisableFog, 0);
|
|
|
|
|
settings->Get("EnableShaderDebugging", &bEnableShaderDebugging, false);
|
2014-07-26 12:43:49 +02:00
|
|
|
settings->Get("BorderlessFullscreen", &bBorderlessFullscreen, false);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* enhancements = iniFile.GetOrCreateSection("Enhancements");
|
|
|
|
|
enhancements->Get("ForceFiltering", &bForceFiltering, 0);
|
|
|
|
|
enhancements->Get("MaxAnisotropy", &iMaxAnisotropy, 0); // NOTE - this is x in (1 << x)
|
|
|
|
|
enhancements->Get("PostProcessingShader", &sPostProcessingShader, "");
|
2014-11-11 00:53:03 +01:00
|
|
|
enhancements->Get("StereoMode", &iStereoMode, 0);
|
2014-12-21 14:06:16 +01:00
|
|
|
enhancements->Get("StereoDepth", &iStereoDepth, 20);
|
2014-11-27 15:28:00 +01:00
|
|
|
enhancements->Get("StereoConvergence", &iStereoConvergence, 20);
|
2014-11-11 00:53:03 +01:00
|
|
|
enhancements->Get("StereoSwapEyes", &bStereoSwapEyes, false);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
|
|
|
|
hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true);
|
|
|
|
|
hacks->Get("EFBCopyEnable", &bEFBCopyEnable, true);
|
|
|
|
|
hacks->Get("EFBToTextureEnable", &bCopyEFBToTexture, true);
|
|
|
|
|
hacks->Get("EFBScaledCopy", &bCopyEFBScaled, true);
|
|
|
|
|
hacks->Get("EFBCopyCacheEnable", &bEFBCopyCacheEnable, false);
|
|
|
|
|
hacks->Get("EFBEmulateFormatChanges", &bEFBEmulateFormatChanges, false);
|
2011-04-25 20:06:45 +00:00
|
|
|
|
2009-06-04 21:21:07 +00:00
|
|
|
// Load common settings
|
2010-02-02 21:56:29 +00:00
|
|
|
iniFile.Load(File::GetUserPath(F_DOLPHINCONFIG_IDX));
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* interface = iniFile.GetOrCreateSection("Interface");
|
2009-06-04 21:21:07 +00:00
|
|
|
bool bTmp;
|
2014-06-16 01:12:43 -04:00
|
|
|
interface->Get("UsePanicHandlers", &bTmp, true);
|
2009-06-04 21:21:07 +00:00
|
|
|
SetEnableAlert(bTmp);
|
2013-08-17 23:48:06 +02:00
|
|
|
|
|
|
|
|
// Shader Debugging causes a huge slowdown and it's easy to forget about it
|
|
|
|
|
// since it's not exposed in the settings dialog. It's only used by
|
|
|
|
|
// developers, so displaying an obnoxious message avoids some confusion and
|
|
|
|
|
// is not too annoying/confusing for users.
|
|
|
|
|
//
|
|
|
|
|
// XXX(delroth): This is kind of a bad place to put this, but the current
|
|
|
|
|
// VideoCommon is a mess and we don't have a central initialization
|
|
|
|
|
// function to do these kind of checks. Instead, the init code is
|
|
|
|
|
// triplicated for each video backend.
|
|
|
|
|
if (bEnableShaderDebugging)
|
|
|
|
|
OSD::AddMessage("Warning: Shader Debugging is enabled, performance will suffer heavily", 15000);
|
2014-12-20 19:13:34 +01:00
|
|
|
|
|
|
|
|
VerifyValidity();
|
2008-12-08 05:25:12 +00:00
|
|
|
}
|
|
|
|
|
|
2013-09-23 02:39:14 -04:00
|
|
|
void VideoConfig::GameIniLoad()
|
2009-06-28 16:47:14 +00:00
|
|
|
{
|
2013-09-04 23:21:45 +02:00
|
|
|
bool gfx_override_exists = false;
|
|
|
|
|
|
|
|
|
|
// XXX: Again, bad place to put OSD messages at (see delroth's comment above)
|
|
|
|
|
// XXX: This will add an OSD message for each projection hack value... meh
|
2013-09-07 23:02:49 +02:00
|
|
|
#define CHECK_SETTING(section, key, var) do { \
|
2013-09-04 23:21:45 +02:00
|
|
|
decltype(var) temp = var; \
|
|
|
|
|
if (iniFile.GetIfExists(section, key, &var) && var != temp) { \
|
2014-07-06 15:33:08 -04:00
|
|
|
std::string msg = StringFromFormat("Note: Option \"%s\" is overridden by game ini.", key); \
|
|
|
|
|
OSD::AddMessage(msg, 7500); \
|
2013-09-04 23:21:45 +02:00
|
|
|
gfx_override_exists = true; \
|
|
|
|
|
} \
|
2013-09-07 23:02:49 +02:00
|
|
|
} while (0)
|
2013-09-04 23:21:45 +02:00
|
|
|
|
2013-09-23 02:39:14 -04:00
|
|
|
IniFile iniFile = SConfig::GetInstance().m_LocalCoreStartupParameter.LoadGameIni();
|
2010-06-03 04:55:39 +00:00
|
|
|
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Hardware", "VSync", bVSync);
|
- Do not parse numerous video options from the game inis, like:
Show FPS, Input Display, Statistics, Projection Statistics, EFB Copy Regions, Dump Textures, Dump EFB target, Dump Frames, Free Look, Use FFV1, Show Shader Errors, Texture Format Overlay, WireFrame, Hotkeys and Adapter
- Also removed various game ini config values which were still parsed from the Video section.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7489 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-04-29 23:43:37 +00:00
|
|
|
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Settings", "wideScreenHack", bWidescreenHack);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "AspectRatio", iAspectRatio);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "Crop", bCrop);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "UseXFB", bUseXFB);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "UseRealXFB", bUseRealXFB);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "SafeTextureCacheColorSamples", iSafeTextureCache_ColorSamples);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "HiresTextures", bHiresTextures);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "EnablePixelLighting", bEnablePixelLighting);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "FastDepthCalc", bFastDepthCalc);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "MSAA", iMultisampleMode);
|
2013-04-08 03:05:12 -04:00
|
|
|
int tmp = -9000;
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Settings", "EFBScale", tmp); // integral
|
2013-04-08 03:11:45 -04:00
|
|
|
if (tmp != -9000)
|
2013-04-05 17:13:48 -04:00
|
|
|
{
|
2013-04-08 03:11:45 -04:00
|
|
|
if (tmp != SCALE_FORCE_INTEGRAL)
|
2013-04-24 09:21:54 -04:00
|
|
|
{
|
2013-04-08 03:11:45 -04:00
|
|
|
iEFBScale = tmp;
|
2013-04-24 09:21:54 -04:00
|
|
|
}
|
|
|
|
|
else // Round down to multiple of native IR
|
2013-04-05 17:13:48 -04:00
|
|
|
{
|
2013-04-08 03:11:45 -04:00
|
|
|
switch (iEFBScale)
|
|
|
|
|
{
|
|
|
|
|
case SCALE_AUTO:
|
|
|
|
|
iEFBScale = SCALE_AUTO_INTEGRAL;
|
|
|
|
|
break;
|
|
|
|
|
case SCALE_1_5X:
|
|
|
|
|
iEFBScale = SCALE_1X;
|
|
|
|
|
break;
|
|
|
|
|
case SCALE_2_5X:
|
|
|
|
|
iEFBScale = SCALE_2X;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
2013-04-05 17:13:48 -04:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Settings", "DstAlphaPass", bDstAlphaPass);
|
|
|
|
|
CHECK_SETTING("Video_Settings", "DisableFog", bDisableFog);
|
2011-04-25 20:06:45 +00:00
|
|
|
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Enhancements", "ForceFiltering", bForceFiltering);
|
|
|
|
|
CHECK_SETTING("Video_Enhancements", "MaxAnisotropy", iMaxAnisotropy); // NOTE - this is x in (1 << x)
|
|
|
|
|
CHECK_SETTING("Video_Enhancements", "PostProcessingShader", sPostProcessingShader);
|
2014-11-11 00:53:03 +01:00
|
|
|
CHECK_SETTING("Video_Enhancements", "StereoMode", iStereoMode);
|
2014-12-21 14:06:16 +01:00
|
|
|
CHECK_SETTING("Video_Enhancements", "StereoDepth", iStereoDepth);
|
2014-11-24 11:50:35 +01:00
|
|
|
CHECK_SETTING("Video_Enhancements", "StereoConvergence", iStereoConvergence);
|
2014-11-11 00:53:03 +01:00
|
|
|
CHECK_SETTING("Video_Enhancements", "StereoSwapEyes", bStereoSwapEyes);
|
2014-11-24 12:01:21 +01:00
|
|
|
|
2014-12-24 23:06:44 +01:00
|
|
|
CHECK_SETTING("Video_Stereoscopy", "StereoEFBMonoDepth", bStereoEFBMonoDepth);
|
2014-12-21 14:06:16 +01:00
|
|
|
CHECK_SETTING("Video_Stereoscopy", "StereoDepthPercentage", iStereoDepthPercentage);
|
2015-01-02 15:27:37 +01:00
|
|
|
CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum);
|
2011-04-25 20:06:45 +00:00
|
|
|
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable);
|
|
|
|
|
CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable);
|
|
|
|
|
CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bCopyEFBToTexture);
|
|
|
|
|
CHECK_SETTING("Video_Hacks", "EFBScaledCopy", bCopyEFBScaled);
|
|
|
|
|
CHECK_SETTING("Video_Hacks", "EFBCopyCacheEnable", bEFBCopyCacheEnable);
|
|
|
|
|
CHECK_SETTING("Video_Hacks", "EFBEmulateFormatChanges", bEFBEmulateFormatChanges);
|
2011-04-25 20:06:45 +00:00
|
|
|
|
2013-09-18 12:27:50 +02:00
|
|
|
CHECK_SETTING("Video", "ProjectionHack", iPhackvalue[0]);
|
2013-09-04 23:21:45 +02:00
|
|
|
CHECK_SETTING("Video", "PH_SZNear", iPhackvalue[1]);
|
|
|
|
|
CHECK_SETTING("Video", "PH_SZFar", iPhackvalue[2]);
|
|
|
|
|
CHECK_SETTING("Video", "PH_ZNear", sPhackvalue[0]);
|
|
|
|
|
CHECK_SETTING("Video", "PH_ZFar", sPhackvalue[1]);
|
|
|
|
|
CHECK_SETTING("Video", "PerfQueriesEnable", bPerfQueriesEnable);
|
|
|
|
|
|
|
|
|
|
if (gfx_override_exists)
|
|
|
|
|
OSD::AddMessage("Warning: Opening the graphics configuration will reset settings and might cause issues!", 10000);
|
2011-02-13 13:42:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void VideoConfig::VerifyValidity()
|
|
|
|
|
{
|
|
|
|
|
// TODO: Check iMaxAnisotropy value
|
2011-04-25 20:06:45 +00:00
|
|
|
if (iAdapter < 0 || iAdapter > ((int)backend_info.Adapters.size() - 1)) iAdapter = 0;
|
2011-02-13 22:36:12 +00:00
|
|
|
if (iMultisampleMode < 0 || iMultisampleMode >= (int)backend_info.AAModes.size()) iMultisampleMode = 0;
|
2014-12-20 19:54:00 +01:00
|
|
|
|
2014-12-20 22:14:45 +01:00
|
|
|
if (iStereoMode > 0)
|
2014-12-20 19:54:00 +01:00
|
|
|
{
|
2014-12-20 22:14:45 +01:00
|
|
|
if (!backend_info.bSupportsGeometryShaders)
|
|
|
|
|
{
|
|
|
|
|
OSD::AddMessage("Stereoscopic 3D isn't supported by your GPU, support for OpenGL 3.2 is required.", 10000);
|
|
|
|
|
iStereoMode = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2014-12-29 19:15:31 +01:00
|
|
|
if (bUseXFB && bUseRealXFB)
|
2014-12-20 22:14:45 +01:00
|
|
|
{
|
|
|
|
|
OSD::AddMessage("Stereoscopic 3D isn't supported with Real XFB, turning off stereoscopy.", 10000);
|
|
|
|
|
iStereoMode = 0;
|
|
|
|
|
}
|
2014-12-20 19:54:00 +01:00
|
|
|
}
|
2009-03-20 11:51:22 +00:00
|
|
|
}
|
|
|
|
|
|
2014-03-12 15:33:41 -04:00
|
|
|
void VideoConfig::Save(const std::string& ini_file)
|
2008-12-08 05:25:12 +00:00
|
|
|
{
|
2010-06-05 01:38:22 +00:00
|
|
|
IniFile iniFile;
|
|
|
|
|
iniFile.Load(ini_file);
|
2010-09-23 02:17:48 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* hardware = iniFile.GetOrCreateSection("Hardware");
|
|
|
|
|
hardware->Set("VSync", bVSync);
|
|
|
|
|
hardware->Set("Adapter", iAdapter);
|
2010-11-24 17:30:04 +00:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* settings = iniFile.GetOrCreateSection("Settings");
|
|
|
|
|
settings->Set("AspectRatio", iAspectRatio);
|
|
|
|
|
settings->Set("Crop", bCrop);
|
|
|
|
|
settings->Set("wideScreenHack", bWidescreenHack);
|
|
|
|
|
settings->Set("UseXFB", bUseXFB);
|
|
|
|
|
settings->Set("UseRealXFB", bUseRealXFB);
|
|
|
|
|
settings->Set("SafeTextureCacheColorSamples", iSafeTextureCache_ColorSamples);
|
|
|
|
|
settings->Set("ShowFPS", bShowFPS);
|
2014-07-09 17:03:17 +02:00
|
|
|
settings->Set("LogRenderTimeToFile", bLogRenderTimeToFile);
|
2014-06-16 01:12:43 -04:00
|
|
|
settings->Set("OverlayStats", bOverlayStats);
|
|
|
|
|
settings->Set("OverlayProjStats", bOverlayProjStats);
|
|
|
|
|
settings->Set("DumpTextures", bDumpTextures);
|
|
|
|
|
settings->Set("HiresTextures", bHiresTextures);
|
|
|
|
|
settings->Set("DumpEFBTarget", bDumpEFBTarget);
|
|
|
|
|
settings->Set("FreeLook", bFreeLook);
|
|
|
|
|
settings->Set("UseFFV1", bUseFFV1);
|
|
|
|
|
settings->Set("EnablePixelLighting", bEnablePixelLighting);
|
|
|
|
|
settings->Set("FastDepthCalc", bFastDepthCalc);
|
|
|
|
|
settings->Set("ShowEFBCopyRegions", bShowEFBCopyRegions);
|
|
|
|
|
settings->Set("MSAA", iMultisampleMode);
|
|
|
|
|
settings->Set("EFBScale", iEFBScale);
|
|
|
|
|
settings->Set("TexFmtOverlayEnable", bTexFmtOverlayEnable);
|
|
|
|
|
settings->Set("TexFmtOverlayCenter", bTexFmtOverlayCenter);
|
|
|
|
|
settings->Set("Wireframe", bWireFrame);
|
|
|
|
|
settings->Set("DstAlphaPass", bDstAlphaPass);
|
|
|
|
|
settings->Set("DisableFog", bDisableFog);
|
|
|
|
|
settings->Set("EnableShaderDebugging", bEnableShaderDebugging);
|
2014-07-26 12:43:49 +02:00
|
|
|
settings->Set("BorderlessFullscreen", bBorderlessFullscreen);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* enhancements = iniFile.GetOrCreateSection("Enhancements");
|
|
|
|
|
enhancements->Set("ForceFiltering", bForceFiltering);
|
|
|
|
|
enhancements->Set("MaxAnisotropy", iMaxAnisotropy);
|
|
|
|
|
enhancements->Set("PostProcessingShader", sPostProcessingShader);
|
2014-11-11 00:53:03 +01:00
|
|
|
enhancements->Set("StereoMode", iStereoMode);
|
2014-12-21 14:06:16 +01:00
|
|
|
enhancements->Set("StereoDepth", iStereoDepth);
|
2014-11-24 11:50:35 +01:00
|
|
|
enhancements->Set("StereoConvergence", iStereoConvergence);
|
2014-11-11 00:53:03 +01:00
|
|
|
enhancements->Set("StereoSwapEyes", bStereoSwapEyes);
|
2011-09-09 21:34:46 +02:00
|
|
|
|
2014-06-16 01:12:43 -04:00
|
|
|
IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks");
|
|
|
|
|
hacks->Set("EFBAccessEnable", bEFBAccessEnable);
|
|
|
|
|
hacks->Set("EFBCopyEnable", bEFBCopyEnable);
|
|
|
|
|
hacks->Set("EFBToTextureEnable", bCopyEFBToTexture);
|
|
|
|
|
hacks->Set("EFBScaledCopy", bCopyEFBScaled);
|
|
|
|
|
hacks->Set("EFBCopyCacheEnable", bEFBCopyCacheEnable);
|
|
|
|
|
hacks->Set("EFBEmulateFormatChanges", bEFBEmulateFormatChanges);
|
2013-03-19 21:51:12 -04:00
|
|
|
|
2010-06-05 01:38:22 +00:00
|
|
|
iniFile.Save(ini_file);
|
2009-09-13 08:21:35 +00:00
|
|
|
}
|
|
|
|
|
|
2013-03-18 20:41:45 -04:00
|
|
|
bool VideoConfig::IsVSync()
|
|
|
|
|
{
|
2014-04-30 12:50:29 +02:00
|
|
|
return bVSync && !Core::GetIsFramelimiterTempDisabled();
|
2013-03-18 20:41:45 -04:00
|
|
|
}
|