2
0

Fix missing input source in dropdown and update metadata
Some checks failed
Build / build (push) Has been cancelled
Build and Release / build (push) Has been cancelled

- Add current input to options if monitor doesn't report it in possible values
- Never hide the currently active input port in config filtering
- Make GetInputSourceName public for reuse
- Update company to MarketAlly, author to David H. Friedel Jr
- Add application icon to exe

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-10 02:03:11 -05:00
parent 139be6f779
commit ac53fbf80e
4 changed files with 26 additions and 10 deletions

View File

@@ -8,14 +8,16 @@
<RootNamespace>DellMonitorControl</RootNamespace> <RootNamespace>DellMonitorControl</RootNamespace>
<Product>ControlMyMonitorManagement</Product> <Product>ControlMyMonitorManagement</Product>
<UseWPF>true</UseWPF> <UseWPF>true</UseWPF>
<Company>Dang</Company> <Company>MarketAlly</Company>
<Copyright>Copyright © DangWang $([System.DateTime]::Now.ToString(yyyy))</Copyright> <Authors>David H. Friedel Jr</Authors>
<Copyright>Copyright © MarketAlly $([System.DateTime]::Now.ToString(yyyy))</Copyright>
<ApplicationIcon>MonitorIcon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<Version>1.0.17</Version> <Version>1.0.18</Version>
<AssemblyVersion>1.0.17.0</AssemblyVersion> <AssemblyVersion>1.0.18.0</AssemblyVersion>
<FileVersion>1.0.17.0</FileVersion> <FileVersion>1.0.18.0</FileVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

View File

@@ -181,6 +181,15 @@ public partial class MainWindow : Window
var inputOptions = await CMMCommand.GetInputSourceOptions(m.SerialNumber); var inputOptions = await CMMCommand.GetInputSourceOptions(m.SerialNumber);
DebugLogger.Log($" Input options count: {inputOptions.Count}"); 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..."); DebugLogger.Log($" Getting power status...");
var powerStatus = await CMMCommand.GetMonPowerStatus(m.SerialNumber) ?? "Unknown"; var powerStatus = await CMMCommand.GetMonPowerStatus(m.SerialNumber) ?? "Unknown";
DebugLogger.Log($" Power status: {powerStatus}"); DebugLogger.Log($" Power status: {powerStatus}");
@@ -188,7 +197,8 @@ public partial class MainWindow : Window
_loadedMonitors.Add((m, inputOptions)); _loadedMonitors.Add((m, inputOptions));
// Apply config to filter hidden ports and use custom labels // 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}"); DebugLogger.Log($" Filtered options count: {filteredOptions.Count}");
// Monitor name header with Config button // Monitor name header with Config button

View File

@@ -86,7 +86,8 @@ public static class MonitorConfigManager
public static List<InputSourceOption> ApplyConfigToOptions( public static List<InputSourceOption> ApplyConfigToOptions(
string serialNumber, string serialNumber,
List<InputSourceOption> options) List<InputSourceOption> options,
int? currentInput = null)
{ {
var monitorConfig = GetMonitorConfig(serialNumber); var monitorConfig = GetMonitorConfig(serialNumber);
@@ -101,8 +102,11 @@ public static class MonitorConfigManager
if (portConfig != null) if (portConfig != null)
{ {
// Respect hidden setting - don't show hidden ports // Never hide the currently active input - user needs to see what's selected
if (portConfig.IsHidden) 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; continue;
if (!string.IsNullOrWhiteSpace(portConfig.CustomLabel)) if (!string.IsNullOrWhiteSpace(portConfig.CustomLabel))

View File

@@ -130,7 +130,7 @@ public static class CMMCommand
return options; return options;
} }
private static string GetInputSourceName(int vcpValue) public static string GetInputSourceName(int vcpValue)
{ {
return vcpValue switch return vcpValue switch
{ {