Add cutscenes ultrawide and framerate fixes
This commit is contained in:
@@ -28,6 +28,8 @@ static SetBoolFn SetDOFFixEnabled = nullptr;
|
|||||||
static SetBoolFn SetCAFixEnabled = nullptr;
|
static SetBoolFn SetCAFixEnabled = nullptr;
|
||||||
static SetBoolFn SetVignettingFixEnabled = nullptr;
|
static SetBoolFn SetVignettingFixEnabled = nullptr;
|
||||||
static SetBoolFn SetCameraFixEnabled = nullptr;
|
static SetBoolFn SetCameraFixEnabled = nullptr;
|
||||||
|
static SetBoolFn SetCutscenesFixEnabled = nullptr;
|
||||||
|
static SetBoolFn SetCutscenesFPSFixEnabled = nullptr;
|
||||||
static SetBoolFn SetVolumetricFogFixEnabled = nullptr;
|
static SetBoolFn SetVolumetricFogFixEnabled = nullptr;
|
||||||
static SetBoolFn SetFogDensityFixEnabled = nullptr;
|
static SetBoolFn SetFogDensityFixEnabled = nullptr;
|
||||||
static SetBoolFn SetFogMaxOpacityFixEnabled = nullptr;
|
static SetBoolFn SetFogMaxOpacityFixEnabled = nullptr;
|
||||||
@@ -43,6 +45,8 @@ static bool DOF_fix_enabled = false;
|
|||||||
static bool CA_fix_enabled = false;
|
static bool CA_fix_enabled = false;
|
||||||
static bool Vignetting_fix_enabled = false;
|
static bool Vignetting_fix_enabled = false;
|
||||||
static bool camera_fix_enabled = false;
|
static bool camera_fix_enabled = false;
|
||||||
|
static bool cutscenes_fix_enabled = false;
|
||||||
|
static bool cutscenes_FPS_fix_enabled = false;
|
||||||
static bool volumetric_fog_fix_enabled = false;
|
static bool volumetric_fog_fix_enabled = false;
|
||||||
static bool Fog_density_fix_enabled = false;
|
static bool Fog_density_fix_enabled = false;
|
||||||
static bool Fog_max_opacity_fix_enabled = false;
|
static bool Fog_max_opacity_fix_enabled = false;
|
||||||
@@ -56,8 +60,8 @@ static bool popup_Informations = false;
|
|||||||
|
|
||||||
// Plugin settings
|
// Plugin settings
|
||||||
const std::string SETTINGS_FILE = "./pluginsettings.ini";
|
const std::string SETTINGS_FILE = "./pluginsettings.ini";
|
||||||
const char* FIX_VERSION = "1.0.3.1";
|
const char* FIX_VERSION = "1.0.4";
|
||||||
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Control camera distance.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Control fog.\n - Re enable console.\n\nDisabling Fog will not entirely remove it.";
|
const char* FIX_INFORMATIONS = "This fix allows to:\n - Control FOV in game.\n - Control camera distance.\n - Unlock cutscenes FPS and enable ultrawide.\n - Disable depth of field.\n - Disable chromatic aberrations.\n - Disable vignetting.\n - Control fog.\n - Re enable console.\n\nDisabling Fog will not entirely remove it.";
|
||||||
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
const char* DONATION_URL = "https://buymeacoffee.com/k4sh44";
|
||||||
|
|
||||||
// Scaling factor based on screen resolution
|
// Scaling factor based on screen resolution
|
||||||
@@ -92,6 +96,8 @@ static void LoadFixDLL()
|
|||||||
SetFogDensityFixEnabled = (SetBoolFn)GetProcAddress(fixLib,"SetFogDensityFixEnabled");
|
SetFogDensityFixEnabled = (SetBoolFn)GetProcAddress(fixLib,"SetFogDensityFixEnabled");
|
||||||
SetFogMaxOpacityFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFogMaxOpacityFixEnabled");
|
SetFogMaxOpacityFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetFogMaxOpacityFixEnabled");
|
||||||
SetCameraFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCameraFixEnabled");
|
SetCameraFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCameraFixEnabled");
|
||||||
|
SetCutscenesFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCutscenesFixEnabled");
|
||||||
|
SetCutscenesFPSFixEnabled = (SetBoolFn)GetProcAddress(fixLib, "SetCutscenesFPSFixEnabled");
|
||||||
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
SetFOV = (SetIntFn)GetProcAddress(fixLib, "SetFOV");
|
||||||
SetCameraDistance = (SetFloatFn)GetProcAddress(fixLib, "SetCameraDistance");
|
SetCameraDistance = (SetFloatFn)GetProcAddress(fixLib, "SetCameraDistance");
|
||||||
SetFogDensity = (SetFloatFn)GetProcAddress(fixLib,"SetFogDensity");
|
SetFogDensity = (SetFloatFn)GetProcAddress(fixLib,"SetFogDensity");
|
||||||
@@ -105,6 +111,8 @@ static void LoadFixDLL()
|
|||||||
if (SetFogMaxOpacity) SetFogMaxOpacity(fogMaxOpacityValue);
|
if (SetFogMaxOpacity) SetFogMaxOpacity(fogMaxOpacityValue);
|
||||||
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
|
if (SetFOVFixEnabled) SetFOVFixEnabled(fov_fix_enabled, true);
|
||||||
if (SetCameraFixEnabled) SetCameraFixEnabled(camera_fix_enabled, true);
|
if (SetCameraFixEnabled) SetCameraFixEnabled(camera_fix_enabled, true);
|
||||||
|
if (SetCutscenesFixEnabled) SetCutscenesFixEnabled(cutscenes_fix_enabled, true);
|
||||||
|
if (SetCutscenesFPSFixEnabled) SetCutscenesFPSFixEnabled(cutscenes_FPS_fix_enabled, true);
|
||||||
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, true);
|
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, true);
|
||||||
if (SetCAFixEnabled) SetCAFixEnabled(CA_fix_enabled, true);
|
if (SetCAFixEnabled) SetCAFixEnabled(CA_fix_enabled, true);
|
||||||
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, true);
|
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, true);
|
||||||
@@ -127,6 +135,8 @@ static void SaveSettings()
|
|||||||
pluginIniFile["2#Individual fix"].setComment("Controls each fix individually");
|
pluginIniFile["2#Individual fix"].setComment("Controls each fix individually");
|
||||||
pluginIniFile["2#Individual fix"]["FOV"] = fov_fix_enabled;
|
pluginIniFile["2#Individual fix"]["FOV"] = fov_fix_enabled;
|
||||||
pluginIniFile["2#Individual fix"]["Camera"] = camera_fix_enabled;
|
pluginIniFile["2#Individual fix"]["Camera"] = camera_fix_enabled;
|
||||||
|
pluginIniFile["2#Individual fix"]["Cutscenes"] = cutscenes_fix_enabled;
|
||||||
|
pluginIniFile["2#Individual fix"]["CutscenesFPS"] = cutscenes_FPS_fix_enabled;
|
||||||
pluginIniFile["2#Individual fix"]["DOF"] = DOF_fix_enabled;
|
pluginIniFile["2#Individual fix"]["DOF"] = DOF_fix_enabled;
|
||||||
pluginIniFile["2#Individual fix"]["Chromatic aberrations"] = CA_fix_enabled;
|
pluginIniFile["2#Individual fix"]["Chromatic aberrations"] = CA_fix_enabled;
|
||||||
pluginIniFile["2#Individual fix"]["Vignetting"] = Vignetting_fix_enabled;
|
pluginIniFile["2#Individual fix"]["Vignetting"] = Vignetting_fix_enabled;
|
||||||
@@ -150,6 +160,8 @@ static void LoadSettings()
|
|||||||
fix_enabled = pluginIniFile["1#General fix"]["Enabled"].as<bool>();
|
fix_enabled = pluginIniFile["1#General fix"]["Enabled"].as<bool>();
|
||||||
fov_fix_enabled = pluginIniFile["2#Individual fix"]["FOV"].as<bool>();
|
fov_fix_enabled = pluginIniFile["2#Individual fix"]["FOV"].as<bool>();
|
||||||
camera_fix_enabled = pluginIniFile["2#Individual fix"]["Camera"].as<bool>();
|
camera_fix_enabled = pluginIniFile["2#Individual fix"]["Camera"].as<bool>();
|
||||||
|
cutscenes_fix_enabled = pluginIniFile["2#Individual fix"]["Cutscenes"].as<bool>();
|
||||||
|
cutscenes_FPS_fix_enabled = pluginIniFile["2#Individual fix"]["CutscenesFPS"].as<bool>();
|
||||||
DOF_fix_enabled = pluginIniFile["2#Individual fix"]["DOF"].as<bool>();
|
DOF_fix_enabled = pluginIniFile["2#Individual fix"]["DOF"].as<bool>();
|
||||||
CA_fix_enabled = pluginIniFile["2#Individual fix"]["Chromatic aberrations"].as<bool>();
|
CA_fix_enabled = pluginIniFile["2#Individual fix"]["Chromatic aberrations"].as<bool>();
|
||||||
Vignetting_fix_enabled = pluginIniFile["2#Individual fix"]["Vignetting"].as<bool>();
|
Vignetting_fix_enabled = pluginIniFile["2#Individual fix"]["Vignetting"].as<bool>();
|
||||||
@@ -175,7 +187,13 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
|
|
||||||
ImGui::SetNextWindowSize(ImVec2(350 * scale, 150 * scale), ImGuiCond_Once);
|
ImGui::SetNextWindowSize(ImVec2(350 * scale, 150 * scale), ImGuiCond_Once);
|
||||||
|
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(0.84f, 0.12f, 0.51f, 1.0f)); // red
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(0.84f, 0.12f, 0.51f, 1.0f)); // red
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(0.84f, 0.2f, 0.51f, 1.0f)); // red
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0.8f, 1.f, 1.f, 1.f)); // white
|
||||||
if (ImGui::Button("Like my work ? Consider donation")) ShellExecuteA(NULL, "open", DONATION_URL, NULL, NULL, SW_SHOWNORMAL); // Donation
|
if (ImGui::Button("Like my work ? Consider donation")) ShellExecuteA(NULL, "open", DONATION_URL, NULL, NULL, SW_SHOWNORMAL); // Donation
|
||||||
|
ImGui::PopStyleColor(4); // Restore color
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button("Fix informations")) popup_Informations = true; // Fix information
|
if (ImGui::Button("Fix informations")) popup_Informations = true; // Fix information
|
||||||
|
|
||||||
@@ -214,6 +232,16 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::Checkbox("Cutscenes", &cutscenes_fix_enabled)) {
|
||||||
|
if (SetCutscenesFixEnabled) SetCutscenesFixEnabled(cutscenes_fix_enabled, false);
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text("Must be enabled before playing cutscenes.");
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox("Vignetting", &Vignetting_fix_enabled)) {
|
if (ImGui::Checkbox("Vignetting", &Vignetting_fix_enabled)) {
|
||||||
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, false);
|
if (SetVignettingFixEnabled) SetVignettingFixEnabled(Vignetting_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
@@ -235,6 +263,16 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
SaveSettings();
|
SaveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ImGui::Checkbox("Cutscenes FPS", &cutscenes_FPS_fix_enabled)) {
|
||||||
|
if (SetCutscenesFPSFixEnabled) SetCutscenesFPSFixEnabled(cutscenes_FPS_fix_enabled, false);
|
||||||
|
SaveSettings();
|
||||||
|
}
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text("Must be enabled before playing cutscenes.");
|
||||||
|
ImGui::EndTooltip();
|
||||||
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox("Depth of field", &DOF_fix_enabled)) {
|
if (ImGui::Checkbox("Depth of field", &DOF_fix_enabled)) {
|
||||||
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, false);
|
if (SetDOFFixEnabled) SetDOFFixEnabled(DOF_fix_enabled, false);
|
||||||
SaveSettings();
|
SaveSettings();
|
||||||
|
|||||||
Reference in New Issue
Block a user