Add the ability to toggle dev console re-enabling

This commit is contained in:
2025-11-15 17:31:23 +01:00
parent ab365d1a70
commit fe84532958

View File

@@ -36,6 +36,7 @@ static bool Vignetting_fix_enabled = false;
static bool Fog_fix_enabled = false;
static bool fix_enabled = false;
static int worldFOVvalue = 0;
static bool console = true;
// Overlays popups
static bool popup_Informations = false;
@@ -44,7 +45,7 @@ static std::string log_content;
// Plugin settings
const std::string SETTINGS_FILE = "./pluginsettings.ini";
const char* FIX_VERSION = "1.0.1";
const char* FIX_VERSION = "1.0.2";
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Enable ultrawide in custcenes.\n - Uncap FPS.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Disable fog.\n - Re enable dev console.";
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
@@ -81,7 +82,7 @@ static void LoadFixDLL()
SetFixesEnabled(GameFixes::ChromaticAberrations, CA_fix_enabled);
SetFixesEnabled(GameFixes::Vignetting, Vignetting_fix_enabled);
SetFixesEnabled(GameFixes::Fog, Fog_fix_enabled);
SetFixesEnabled(GameFixes::DevConsole, true);
SetFixesEnabled(GameFixes::DevConsole, console);
}
}
}
@@ -95,6 +96,7 @@ static void SaveSettings()
" ",
"Controls if fix mod (globally) is enabled"});
pluginIniFile["1#General fix"]["Enabled"] = fix_enabled;
pluginIniFile["1#General fix"]["Console"] = console;
pluginIniFile["2#Individual fix"].setComment("Controls each fix individually");
pluginIniFile["2#Individual fix"]["FOV"] = fov_fix_enabled;
pluginIniFile["2#Individual fix"]["UltraWide"] = ultrawide_fix_enabled;
@@ -115,6 +117,7 @@ static void LoadSettings()
try {
pluginIniFile.load(SETTINGS_FILE);
fix_enabled = pluginIniFile["1#General fix"]["Enabled"].as<bool>();
console = pluginIniFile["1#General fix"]["Console"].as<bool>();
fov_fix_enabled = pluginIniFile["2#Individual fix"]["FOV"].as<bool>();
ultrawide_fix_enabled = pluginIniFile["2#Individual fix"]["UltraWide"].as<bool>();
FPS_fix_enabled = pluginIniFile["2#Individual fix"]["Framerate"].as<bool>();