diff --git a/src/Util.cpp b/src/Util.cpp index d00fed6fd..b1afc8715 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -423,6 +423,13 @@ namespace Util ImGui::EndTooltip(); } } + + bool IsDynamicResolution() + { + const auto address = REL::RelocationID{ 508794, 380760 }.address(); + bool* bDynamicResolution = reinterpret_cast(address); + return *bDynamicResolution; + } } namespace nlohmann diff --git a/src/Util.h b/src/Util.h index 8f11c58ec..dfa0e8359 100644 --- a/src/Util.h +++ b/src/Util.h @@ -125,6 +125,14 @@ namespace Util } inline bool isNewFrame() { return isNewFrame(RE::BSGraphics::State::GetSingleton()->frameCount); } }; + + /** + * @brief Checks if dynamic resolution is currently enabled. + * + * @return true if dynamic resolution is enabled, false otherwise. + */ + bool IsDynamicResolution(); + } namespace nlohmann