From cbd4a5e27cd0597c5768d14415b43028a597e7f7 Mon Sep 17 00:00:00 2001 From: Serge <5920850+seerge@users.noreply.github.com> Date: Thu, 29 Aug 2024 23:12:34 +0200 Subject: [PATCH] Exception handling https://github.com/seerge/g-helper/issues/3029 --- app/Display/ScreenCCD.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/Display/ScreenCCD.cs b/app/Display/ScreenCCD.cs index f1bac24b..3b1e32c7 100644 --- a/app/Display/ScreenCCD.cs +++ b/app/Display/ScreenCCD.cs @@ -16,7 +16,10 @@ namespace GHelper.Display var modes = new DISPLAYCONFIG_MODE_INFO[modeCount]; err = QueryDisplayConfig(QDC.QDC_ONLY_ACTIVE_PATHS, ref pathCount, paths, ref modeCount, modes, IntPtr.Zero); if (err != 0) - throw new Win32Exception(err); + { + Logger.WriteLine("HDR Detection Error: " + new Win32Exception(err).Message); + return false; + } string internalName = AppConfig.GetString("internal_display");