From 2b4c1289dbb69e9b70c5990f2fd9cba27354d704 Mon Sep 17 00:00:00 2001 From: Anthony Titus Date: Sun, 15 Sep 2024 02:20:54 -0400 Subject: [PATCH] fix: Completely Disable freeze check with ini setting --- CMakeLists.txt | 4 ++-- src/GidFileCache.cpp | 9 +++------ src/Hooks.cpp | 11 ++++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a78bf28..9d0d4fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,13 +1,13 @@ cmake_minimum_required(VERSION 3.21) set(NAME "NGIO-NG" CACHE STRING "") -set(VERSION 1.0.14 CACHE STRING "") +set(VERSION 1.1.0 CACHE STRING "") set(VR_VERSION 1) set(AE_VERSION 1) option(COPY_BUILD "Copy the build output to the Skyrim directory." FALSE) option(BUILD_SKYRIMVR "Build for Skyrim VR" OFF) option(BUILD_SKYRIMAE "Build for Skyrim AE" OFF) -option(BUILD_ZIP "Create a 7z archive." FALSE) +option(BUILD_ZIP "Create a 7z archive." TRUE) # ---- Cache build vars ---- macro(set_from_environment VARIABLE) diff --git a/src/GidFileCache.cpp b/src/GidFileCache.cpp index a1cc726..e49acd9 100644 --- a/src/GidFileCache.cpp +++ b/src/GidFileCache.cpp @@ -256,12 +256,9 @@ namespace GrassControl std::this_thread::sleep_for(std::chrono::milliseconds(1000)); continue; } - if (Config::FreezeCheck) { - RE::DebugMessageBox("Grass generation appears to have frozen! Restart the game."); - Util::report_and_fail_timed("Grass generation appears to have frozen! Restart the game."); - } else { - logger::info("Grass generation appears to have frozen!"); - } + + RE::DebugMessageBox("Grass generation appears to have frozen! Restart the game."); + Util::report_and_fail_timed("Grass generation appears to have frozen! Restart the game."); } } diff --git a/src/Hooks.cpp b/src/Hooks.cpp index 3a282b2..dfb5aca 100644 --- a/src/Hooks.cpp +++ b/src/Hooks.cpp @@ -36,9 +36,11 @@ namespace GrassControl GidFileGenerationTask::cur_state = 1; - GidFileGenerationTask::_lastDidSomething = GetTickCount64(); - std::thread t(GidFileGenerationTask::run_freeze_check); - t.detach(); + if (Config::FreezeCheck) { + GidFileGenerationTask::_lastDidSomething = GetTickCount64(); + std::thread t(GidFileGenerationTask::run_freeze_check); + t.detach(); + } auto gf = std::make_unique(); GidFileGenerationTask::cur_instance = std::move(gf); @@ -81,7 +83,6 @@ namespace GrassControl auto fi = std::filesystem::path(Util::getProgressFilePath()); if (Config::UseGrassCache && exists(fi)) { - #ifdef SKYRIMVR auto setting = RE::INISettingCollection::GetSingleton()->GetSetting("bLoadVRPlayroom:VR"); if (!setting) { @@ -103,7 +104,7 @@ namespace GrassControl } else if (Config::UseGrassCache) { logger::info("Grass Cache is Enabled. PrecacheGrass.txt is not detected, assuming normal usage."); } else { - logger::info("Grass Cache is Disabled"); + logger::info("Grass Cache is Disabled"); } switch (Config::DynDOLODGrassMode) {