Changeset View
Changeset View
Standalone View
Standalone View
source/ps/GameSetup/Config.cpp
Show All 29 Lines | |||||
const wchar_t g_DefaultCursor[] = L"default-arrow"; | const wchar_t g_DefaultCursor[] = L"default-arrow"; | ||||
CStrW g_CursorName = g_DefaultCursor; | CStrW g_CursorName = g_DefaultCursor; | ||||
bool g_NoGLS3TC = false; | bool g_NoGLS3TC = false; | ||||
bool g_NoGLAutoMipmap = false; | bool g_NoGLAutoMipmap = false; | ||||
bool g_NoGLVBO = false; | bool g_NoGLVBO = false; | ||||
bool g_PauseOnFocusLoss = false; | bool g_PauseGameOnFocusLoss = false; | ||||
bool g_PauseRendererOnFocusLoss = false; | |||||
bool g_RenderActors = true; | bool g_RenderActors = true; | ||||
bool g_Shadows = false; | bool g_Shadows = false; | ||||
bool g_ShadowPCF = false; | bool g_ShadowPCF = false; | ||||
bool g_WaterEffects = true; | bool g_WaterEffects = true; | ||||
bool g_WaterFancyEffects = false; | bool g_WaterFancyEffects = false; | ||||
Show All 40 Lines | |||||
// Fill in the globals from the config files. | // Fill in the globals from the config files. | ||||
static void LoadGlobals() | static void LoadGlobals() | ||||
{ | { | ||||
CFG_GET_VAL("vsync", g_VSync); | CFG_GET_VAL("vsync", g_VSync); | ||||
CFG_GET_VAL("nos3tc", g_NoGLS3TC); | CFG_GET_VAL("nos3tc", g_NoGLS3TC); | ||||
CFG_GET_VAL("noautomipmap", g_NoGLAutoMipmap); | CFG_GET_VAL("noautomipmap", g_NoGLAutoMipmap); | ||||
CFG_GET_VAL("novbo", g_NoGLVBO); | CFG_GET_VAL("novbo", g_NoGLVBO); | ||||
CFG_GET_VAL("pauseonfocusloss", g_PauseOnFocusLoss); | |||||
ConfigSetPauseOnFocusLoss(); | |||||
CFG_GET_VAL("renderactors", g_RenderActors); | CFG_GET_VAL("renderactors", g_RenderActors); | ||||
CFG_GET_VAL("shadows", g_Shadows); | CFG_GET_VAL("shadows", g_Shadows); | ||||
CFG_GET_VAL("shadowpcf", g_ShadowPCF); | CFG_GET_VAL("shadowpcf", g_ShadowPCF); | ||||
CFG_GET_VAL("watereffects", g_WaterEffects); | CFG_GET_VAL("watereffects", g_WaterEffects); | ||||
CFG_GET_VAL("waterfancyeffects", g_WaterFancyEffects); | CFG_GET_VAL("waterfancyeffects", g_WaterFancyEffects); | ||||
CFG_GET_VAL("waterrealdepth", g_WaterRealDepth); | CFG_GET_VAL("waterrealdepth", g_WaterRealDepth); | ||||
CFG_GET_VAL("waterrefraction", g_WaterRefraction); | CFG_GET_VAL("waterrefraction", g_WaterRefraction); | ||||
CFG_GET_VAL("waterreflection", g_WaterReflection); | CFG_GET_VAL("waterreflection", g_WaterReflection); | ||||
CFG_GET_VAL("watershadows", g_WaterShadows); | CFG_GET_VAL("watershadows", g_WaterShadows); | ||||
CFG_GET_VAL("renderpath", g_RenderPath); | CFG_GET_VAL("renderpath", g_RenderPath); | ||||
CFG_GET_VAL("particles", g_Particles); | CFG_GET_VAL("particles", g_Particles); | ||||
CFG_GET_VAL("fog", g_Fog); | CFG_GET_VAL("fog", g_Fog); | ||||
CFG_GET_VAL("silhouettes", g_Silhouettes); | CFG_GET_VAL("silhouettes", g_Silhouettes); | ||||
CFG_GET_VAL("showsky", g_ShowSky); | CFG_GET_VAL("showsky", g_ShowSky); | ||||
CFG_GET_VAL("preferglsl", g_PreferGLSL); | CFG_GET_VAL("preferglsl", g_PreferGLSL); | ||||
CFG_GET_VAL("postproc", g_PostProc); | CFG_GET_VAL("postproc", g_PostProc); | ||||
CFG_GET_VAL("smoothlos", g_SmoothLOS); | CFG_GET_VAL("smoothlos", g_SmoothLOS); | ||||
CFG_GET_VAL("gui.scale", g_GuiScale); | CFG_GET_VAL("gui.scale", g_GuiScale); | ||||
} | } | ||||
void ConfigSetPauseOnFocusLoss() | |||||
{ | |||||
int pauseOnFocusLoss = 0; | |||||
CFG_GET_VAL("pauseonfocusloss", pauseOnFocusLoss); | |||||
elexis: no new function for only 2 of 20 settings.
JSInterface_Renderer.cpp is the path every other… | |||||
g_PauseGameOnFocusLoss = false; | |||||
g_PauseRendererOnFocusLoss = false; | |||||
switch (pauseOnFocusLoss) | |||||
{ | |||||
case 3: | |||||
g_PauseRendererOnFocusLoss = true; | |||||
break; | |||||
case 2: | |||||
g_PauseRendererOnFocusLoss = true; | |||||
case 1: | |||||
g_PauseGameOnFocusLoss = true; | |||||
} | |||||
} | |||||
static void ProcessCommandLineArgs(const CmdLineArgs& args) | static void ProcessCommandLineArgs(const CmdLineArgs& args) | ||||
{ | { | ||||
// TODO: all these options (and the ones processed elsewhere) should | // TODO: all these options (and the ones processed elsewhere) should | ||||
// be documented somewhere for users. | // be documented somewhere for users. | ||||
// Handle "-conf=key:value" (potentially multiple times) | // Handle "-conf=key:value" (potentially multiple times) | ||||
std::vector<CStr> conf = args.GetMultiple("conf"); | std::vector<CStr> conf = args.GetMultiple("conf"); | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator
no new function for only 2 of 20 settings.
JSInterface_Renderer.cpp is the path every other renderer option takes