Don't always override rdp hidpi setting

This commit is contained in:
crschnick
2026-08-05 00:19:13 +00:00
parent b7d6bfa1dc
commit eb4bf59b68
2 changed files with 3 additions and 2 deletions
@@ -21,7 +21,7 @@ public class WindowsAppRdpClient implements ExternalApplicationType.MacApplicati
@Override
public void launch(RdpLaunchConfig configuration) throws Exception {
var adjusted = AppDisplayScale.getEffectiveDisplayScale() >= 2.0
var adjusted = AppDisplayScale.getEffectiveDisplayScale() >= 2.0 && configuration.getConfig().get("ForceHiDpiOptimizations").isEmpty()
? configuration
.getConfig()
.overlay(Map.of("ForceHiDpiOptimizations", new RdpConfig.TypedValue("i", "1")))
@@ -72,7 +72,8 @@ public class RdpConfig {
}
public Optional<TypedValue> get(String key) {
return Optional.ofNullable(content.get(key));
var found = content.entrySet().stream().filter(e -> e.getKey().equalsIgnoreCase(key)).findFirst();
return found.map(Map.Entry::getValue);
}
@Value