Add world time dilation fix shortcut
This commit is contained in:
@@ -38,6 +38,7 @@ static bool CA_fix_enabled = false;
|
|||||||
static bool Vignetting_fix_enabled = false;
|
static bool Vignetting_fix_enabled = false;
|
||||||
static bool Fog_fix_enabled = false;
|
static bool Fog_fix_enabled = false;
|
||||||
static bool World_Time_Dilation_fix_enabled = false;
|
static bool World_Time_Dilation_fix_enabled = false;
|
||||||
|
static bool prev_WorldTimeDilation = World_Time_Dilation_fix_enabled;
|
||||||
static bool fix_enabled = false;
|
static bool fix_enabled = false;
|
||||||
static bool console = true;
|
static bool console = true;
|
||||||
static int worldFOVValue = 0;
|
static int worldFOVValue = 0;
|
||||||
@@ -257,9 +258,11 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox("World time dilation", &World_Time_Dilation_fix_enabled)) {
|
ImGui::Checkbox("World time dilation", &World_Time_Dilation_fix_enabled);
|
||||||
if (SetFixesEnabled) SetFixesEnabled(GameFixes::WorldTimeDilation, World_Time_Dilation_fix_enabled);
|
if (ImGui::IsItemHovered()) {
|
||||||
SaveSettings();
|
ImGui::BeginTooltip();
|
||||||
|
ImGui::Text("Use ALT + F1 shortcut to de/activate.");
|
||||||
|
ImGui::EndTooltip();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Checkbox("HUD scaling", &HUD_fix_enabled)) {
|
if (ImGui::Checkbox("HUD scaling", &HUD_fix_enabled)) {
|
||||||
@@ -345,6 +348,19 @@ static void on_overlay_draw(reshade::api::effect_runtime* runtime)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void on_reshade_present(reshade::api::effect_runtime* runtime) {
|
||||||
|
if (runtime->is_key_pressed(VK_F1) && runtime->is_key_down(VK_MENU))
|
||||||
|
World_Time_Dilation_fix_enabled = !World_Time_Dilation_fix_enabled;
|
||||||
|
|
||||||
|
if (prev_WorldTimeDilation != World_Time_Dilation_fix_enabled) {
|
||||||
|
if (SetFixesEnabled)
|
||||||
|
SetFixesEnabled(GameFixes::WorldTimeDilation, World_Time_Dilation_fix_enabled);
|
||||||
|
|
||||||
|
SaveSettings();
|
||||||
|
prev_WorldTimeDilation = World_Time_Dilation_fix_enabled;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Main dll intrance
|
// Main dll intrance
|
||||||
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID)
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID)
|
||||||
{
|
{
|
||||||
@@ -360,8 +376,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD ul_reason_for_call, LPVOID)
|
|||||||
[](reshade::api::effect_runtime* runtime) {
|
[](reshade::api::effect_runtime* runtime) {
|
||||||
LoadFixDLL();
|
LoadFixDLL();
|
||||||
});
|
});
|
||||||
|
reshade::register_event<reshade::addon_event::reshade_present>(&on_reshade_present);
|
||||||
break;
|
break;
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
|
reshade::unregister_event<reshade::addon_event::reshade_present>(&on_reshade_present);
|
||||||
reshade::unregister_addon(hinstDLL);
|
reshade::unregister_addon(hinstDLL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user