From 7b3884c86baca184b256020a4a2838be0a8bccd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Wed, 23 Nov 2022 10:26:24 +0100 Subject: [PATCH] Reset FPS limit if anything related to resolution changes --- PowerControl/MenuStack.cs | 12 +++++++++--- RELEASE.md | 1 + 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/PowerControl/MenuStack.cs b/PowerControl/MenuStack.cs index 259b08e..4acd8ba 100644 --- a/PowerControl/MenuStack.cs +++ b/PowerControl/MenuStack.cs @@ -72,8 +72,11 @@ namespace PowerControl ApplyValue = delegate(object selected) { DisplayResolutionController.SetResolution((DisplayResolutionController.DisplayResolution)selected); - Root["Refresh Rate"].Update(); // force refresh Refresh Rate - Root["FPS Limit"].Update(); // force refresh FPS limit + // force refresh Refresh Rate + Root["Refresh Rate"].Update(); + // force reset and refresh of FPS limit + Root["FPS Limit"].Reset(); + Root["FPS Limit"].Update(); return DisplayResolutionController.GetResolution(); } }, @@ -96,7 +99,9 @@ namespace PowerControl ApplyValue = delegate(object selected) { DisplayResolutionController.SetRefreshRate((int)selected); - Root["FPS Limit"].Update(); // force refresh FPS limit + // force reset and refresh of FPS limit + Root["FPS Limit"].Reset(); + Root["FPS Limit"].Update(); return DisplayResolutionController.GetRefreshRate(); } }, @@ -177,6 +182,7 @@ namespace PowerControl Root["Resolution"].Update(); Root["Refresh Rate"].Update(); + Root["FPS Limit"].Reset(); Root["FPS Limit"].Update(); if (!GPUScaling.Enabled) diff --git a/RELEASE.md b/RELEASE.md index 63e3f04..5cc948d 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -11,5 +11,6 @@ - Allow to control GPU Scaling and Display Color Correction - Do not use WinRing0 for GPU detection to control CPU/GPU frequency - Reset `LibreHardware` on system resume to fix battery bug +- Reset FPS limit if anything related to resolution changes If you found it useful buy me [Ko-fi](https://ko-fi.com/ayufan).