Add Reset and Detect buttons to Config dialog
- Reset button: clears custom labels, unhides all ports, removes discovered ports - Detect button: tries common VCP 60 values to discover available input ports - Version bumped to 1.1.2 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -181,13 +181,25 @@ public partial class MainWindow : Window
|
||||
var inputOptions = await CMMCommand.GetInputSourceOptions(m.SerialNumber);
|
||||
DebugLogger.Log($" Input options count: {inputOptions.Count}");
|
||||
|
||||
// Add any previously discovered ports from config
|
||||
var discoveredPorts = MonitorConfigManager.GetDiscoveredPorts(m.SerialNumber, inputOptions);
|
||||
foreach (var port in discoveredPorts)
|
||||
{
|
||||
inputOptions.Insert(0, port);
|
||||
DebugLogger.Log($" Added discovered port from config: {port.Value} ({port.Name})");
|
||||
}
|
||||
|
||||
// Some monitors don't report current input in their possible values list
|
||||
// Add it if missing so user can see what's currently selected
|
||||
// Add it if missing and save to config for future
|
||||
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})");
|
||||
|
||||
// Save this discovered port so it appears in future even when not current
|
||||
MonitorConfigManager.AddDiscoveredPort(m.SerialNumber, m.MonitorName, inputSource.Value, currentInputName);
|
||||
DebugLogger.Log($" Saved discovered port to config");
|
||||
}
|
||||
|
||||
DebugLogger.Log($" Getting power status...");
|
||||
|
||||
Reference in New Issue
Block a user