From be08d1e7a4849473a160f22a410d959723ea154c Mon Sep 17 00:00:00 2001 From: Hyper <34012267+hyperbx@users.noreply.github.com> Date: Mon, 21 Oct 2024 13:09:39 +0100 Subject: [PATCH] config: clamp resolution scale to 0.25-2.0 --- UnleashedRecomp/config.cpp | 2 ++ UnleashedRecomp/stdafx.h | 1 + 2 files changed, 3 insertions(+) diff --git a/UnleashedRecomp/config.cpp b/UnleashedRecomp/config.cpp index 00c412c..5826b02 100644 --- a/UnleashedRecomp/config.cpp +++ b/UnleashedRecomp/config.cpp @@ -49,6 +49,8 @@ void Config::Load() { printf("Failed to parse configuration: %s\n", err.what()); } + + ResolutionScale = std::clamp(ResolutionScale, 0.25f, 2.0f); } void Config::Save() diff --git a/UnleashedRecomp/stdafx.h b/UnleashedRecomp/stdafx.h index 6233ba0..4f8f226 100644 --- a/UnleashedRecomp/stdafx.h +++ b/UnleashedRecomp/stdafx.h @@ -3,6 +3,7 @@ #define NOMINMAX #include +#include #include #include #include