Logs improvement
This commit is contained in:
@@ -177,16 +177,17 @@ extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init)
|
|||||||
Offsets::ProcessEvent = static_cast<UC::uint32>(gProcessEventOffset);// Update ProcessEvent offset
|
Offsets::ProcessEvent = static_cast<UC::uint32>(gProcessEventOffset);// Update ProcessEvent offset
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
logger->info("-------------- Fixes initialisation -------------");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_fix_enabled)
|
||||||
|
logger->info("-------------- Fixes initialisation -------------");
|
||||||
if (!init && FOVaddress) FOVFixEnabled();
|
if (!init && FOVaddress) FOVFixEnabled();
|
||||||
if (!init && Ultrawideaddress) UltrawideFixEnabled();
|
if (!init && Ultrawideaddress) UltrawideFixEnabled();
|
||||||
if (!init && DOFaddress) DOFFixEnabled();
|
if (!init && DOFaddress) DOFFixEnabled();
|
||||||
if (!init && CAaddress) CAFixEnabled();
|
if (!init && CAaddress) CAFixEnabled();
|
||||||
if (!init && Vignettingaddress) VignettingFixEnabled();
|
if (!init && Vignettingaddress) VignettingFixEnabled();
|
||||||
if (!init && Fogaddress) FogFixEnabled();
|
if (!init && Fogaddress) FogFixEnabled();
|
||||||
|
if (!init && GObjectsaddress && AppendStringaddress && ProcessEventaddress) EnableConsole();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setters for Reshade addon call
|
// Setters for Reshade addon call
|
||||||
@@ -254,7 +255,7 @@ static void UltrawideFixEnabled() {
|
|||||||
FOVFixEnabled();
|
FOVFixEnabled();
|
||||||
logger->info("Aspect fix enabled");
|
logger->info("Aspect fix enabled");
|
||||||
}
|
}
|
||||||
if (!(g_fix_enabled && g_ultrawide_fix_enabled)) {
|
if (!(g_fix_enabled && g_ultrawide_fix_enabled) && Ultrawideaddress) {
|
||||||
if (AspectHook) AspectHook.disable();
|
if (AspectHook) AspectHook.disable();
|
||||||
logger->info("Aspect ratio fix disabled");
|
logger->info("Aspect ratio fix disabled");
|
||||||
}
|
}
|
||||||
@@ -315,19 +316,10 @@ static void FogFixEnabled() {
|
|||||||
// UE Console creation
|
// UE Console creation
|
||||||
static void EnableConsole()
|
static void EnableConsole()
|
||||||
{
|
{
|
||||||
if (g_Console_Enabled) return;
|
if (g_Console_Enabled || !g_Console || !GObjectsaddress || !AppendStringaddress || !ProcessEventaddress)
|
||||||
if (!g_Console) {
|
|
||||||
logger->info("------------------ User inputs ------------------");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
logger->info("-------------- Console re-enabling --------------");
|
logger->info("-------------- Console re-enabling --------------");
|
||||||
if (!GObjectsaddress || !AppendStringaddress || !ProcessEventaddress) {
|
|
||||||
logger->warn("Could not re-enable console");
|
|
||||||
logger->info("------------------ User inputs ------------------");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::thread([&]() {
|
std::thread([&]() {
|
||||||
auto start = std::chrono::high_resolution_clock::now(); // Measure the time to renable console
|
auto start = std::chrono::high_resolution_clock::now(); // Measure the time to renable console
|
||||||
UEngine* Engine = nullptr;
|
UEngine* Engine = nullptr;
|
||||||
@@ -368,6 +360,7 @@ static void EnableConsole()
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger->error("Could not spawn console object");
|
logger->error("Could not spawn console object");
|
||||||
|
logger->info("------------------ User inputs ------------------");
|
||||||
}
|
}
|
||||||
}).detach();
|
}).detach();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user