Fix screens infinite loop when retrieving monitor name

This commit is contained in:
Lea Anthony 2025-01-12 20:38:49 +11:00
commit aa97009c35
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405

View file

@ -39,6 +39,7 @@ func getMonitorName(deviceName string) (string, error) {
if device.StateFlags&0x1 != 0 {
return syscall.UTF16ToString(device.DeviceString[:]), nil
}
i++
}
return "", fmt.Errorf("monitor name not found for device: %s", deviceName)