Remove unnecessary code. Add explicit log.
This commit is contained in:
@@ -5,7 +5,6 @@
|
|||||||
// Constants
|
// Constants
|
||||||
const std::string PLUGIN_NAME = "DeathStranding2";
|
const std::string PLUGIN_NAME = "DeathStranding2";
|
||||||
const std::string PLUGIN_LOG = PLUGIN_NAME + ".log";
|
const std::string PLUGIN_LOG = PLUGIN_NAME + ".log";
|
||||||
constexpr ULONGLONG DEFAULT_DELAY_BETWEEN_TICK = 500; // Used for retrieving Game resolution
|
|
||||||
|
|
||||||
// Logger
|
// Logger
|
||||||
std::shared_ptr<spdlog::logger> logger;
|
std::shared_ptr<spdlog::logger> logger;
|
||||||
@@ -47,7 +46,6 @@ static void UltraWideFixEnabled();
|
|||||||
static void CameraFixEnabled();
|
static void CameraFixEnabled();
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
extern "C" __declspec(dllexport) void SetFixEnabled(bool enabled, bool init) {
|
||||||
//return;
|
|
||||||
g_fix_enabled = enabled;
|
g_fix_enabled = enabled;
|
||||||
if (!AOBScanDone) { // Decima Engine
|
if (!AOBScanDone) { // Decima Engine
|
||||||
logger->info("--------------- AOB scan started ---------------");
|
logger->info("--------------- AOB scan started ---------------");
|
||||||
@@ -84,6 +82,7 @@ extern "C" __declspec(dllexport) void SetFixesEnabled(GameFixes fix, bool enable
|
|||||||
if (fix == GameFixes::FOV) { g_fov_fix_enabled = enabled; FOVFixEnabled(); }
|
if (fix == GameFixes::FOV) { g_fov_fix_enabled = enabled; FOVFixEnabled(); }
|
||||||
if (fix == GameFixes::UltraWide) { g_ultrawide_fix_enabled = enabled; UltraWideFixEnabled(); }
|
if (fix == GameFixes::UltraWide) { g_ultrawide_fix_enabled = enabled; UltraWideFixEnabled(); }
|
||||||
if (fix == GameFixes::Camera) { g_camera_fix_enabled = enabled; CameraFixEnabled(); }
|
if (fix == GameFixes::Camera) { g_camera_fix_enabled = enabled; CameraFixEnabled(); }
|
||||||
|
if (fix == GameFixes::None) logger->info("------------------ User inputs ------------------");
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" __declspec(dllexport) void SetValues(GameSetting setting, float value) {
|
extern "C" __declspec(dllexport) void SetValues(GameSetting setting, float value) {
|
||||||
@@ -127,7 +126,7 @@ static void UltraWideFixEnabled() {
|
|||||||
if (g_fix_enabled && g_ultrawide_fix_enabled) {
|
if (g_fix_enabled && g_ultrawide_fix_enabled) {
|
||||||
if (!UWHook) {
|
if (!UWHook) {
|
||||||
std::thread([]() {
|
std::thread([]() {
|
||||||
Sleep(5000);
|
Sleep(5000); // Necessary here to avoid CTD on launch
|
||||||
UWHook = safetyhook::create_mid(Ultrawideaddress,
|
UWHook = safetyhook::create_mid(Ultrawideaddress,
|
||||||
[](SafetyHookContext& ctx) {
|
[](SafetyHookContext& ctx) {
|
||||||
ctx.xmm0.f32[0] = g_AspectRatio;
|
ctx.xmm0.f32[0] = g_AspectRatio;
|
||||||
|
|||||||
Reference in New Issue
Block a user