diff --git a/DellMonitorControl/DellMonitorControl.csproj b/DellMonitorControl/DellMonitorControl.csproj
index e5b9748..aeb4f17 100644
--- a/DellMonitorControl/DellMonitorControl.csproj
+++ b/DellMonitorControl/DellMonitorControl.csproj
@@ -8,14 +8,16 @@
DellMonitorControl
ControlMyMonitorManagement
true
- Dang
- Copyright © DangWang $([System.DateTime]::Now.ToString(yyyy))
+ MarketAlly
+ David H. Friedel Jr
+ Copyright © MarketAlly $([System.DateTime]::Now.ToString(yyyy))
+ MonitorIcon.ico
- 1.0.17
- 1.0.17.0
- 1.0.17.0
+ 1.0.18
+ 1.0.18.0
+ 1.0.18.0
diff --git a/DellMonitorControl/MainWindow.xaml.cs b/DellMonitorControl/MainWindow.xaml.cs
index 6e74270..6aa7383 100644
--- a/DellMonitorControl/MainWindow.xaml.cs
+++ b/DellMonitorControl/MainWindow.xaml.cs
@@ -181,6 +181,15 @@ public partial class MainWindow : Window
var inputOptions = await CMMCommand.GetInputSourceOptions(m.SerialNumber);
DebugLogger.Log($" Input options count: {inputOptions.Count}");
+ // Some monitors don't report current input in their possible values list
+ // Add it if missing so user can see what's currently selected
+ if (inputSource.HasValue && !inputOptions.Any(o => o.Value == inputSource.Value))
+ {
+ var currentInputName = CMMCommand.GetInputSourceName(inputSource.Value);
+ inputOptions.Insert(0, new InputSourceOption(inputSource.Value, currentInputName));
+ DebugLogger.Log($" Added missing current input: {inputSource.Value} ({currentInputName})");
+ }
+
DebugLogger.Log($" Getting power status...");
var powerStatus = await CMMCommand.GetMonPowerStatus(m.SerialNumber) ?? "Unknown";
DebugLogger.Log($" Power status: {powerStatus}");
@@ -188,7 +197,8 @@ public partial class MainWindow : Window
_loadedMonitors.Add((m, inputOptions));
// Apply config to filter hidden ports and use custom labels
- var filteredOptions = MonitorConfigManager.ApplyConfigToOptions(m.SerialNumber, inputOptions);
+ // Pass currentInput so we never hide the currently active port
+ var filteredOptions = MonitorConfigManager.ApplyConfigToOptions(m.SerialNumber, inputOptions, inputSource);
DebugLogger.Log($" Filtered options count: {filteredOptions.Count}");
// Monitor name header with Config button
diff --git a/Library/Config/MonitorConfigManager.cs b/Library/Config/MonitorConfigManager.cs
index 5fdbb54..811a4fa 100644
--- a/Library/Config/MonitorConfigManager.cs
+++ b/Library/Config/MonitorConfigManager.cs
@@ -86,7 +86,8 @@ public static class MonitorConfigManager
public static List ApplyConfigToOptions(
string serialNumber,
- List options)
+ List options,
+ int? currentInput = null)
{
var monitorConfig = GetMonitorConfig(serialNumber);
@@ -101,8 +102,11 @@ public static class MonitorConfigManager
if (portConfig != null)
{
- // Respect hidden setting - don't show hidden ports
- if (portConfig.IsHidden)
+ // Never hide the currently active input - user needs to see what's selected
+ bool isCurrentInput = currentInput.HasValue && option.Value == currentInput.Value;
+
+ // Respect hidden setting - don't show hidden ports (unless it's the current input)
+ if (portConfig.IsHidden && !isCurrentInput)
continue;
if (!string.IsNullOrWhiteSpace(portConfig.CustomLabel))
diff --git a/Library/Method/CMMCommand.cs b/Library/Method/CMMCommand.cs
index cabf4e1..87f6df3 100644
--- a/Library/Method/CMMCommand.cs
+++ b/Library/Method/CMMCommand.cs
@@ -130,7 +130,7 @@ public static class CMMCommand
return options;
}
- private static string GetInputSourceName(int vcpValue)
+ public static string GetInputSourceName(int vcpValue)
{
return vcpValue switch
{