mirror of
https://github.com/utmapp/UTM.git
synced 2026-10-12 02:24:01 +00:00
display(macOS): fix saving dynamic resolution
We saved the guest resolution but we restored it as a host view size so this led to an incorrect second re-scaling causing incorrect resolution to be restored. Fixes #6854 Fixes #6864
This commit is contained in:
@@ -419,7 +419,6 @@ extension VMDisplayQemuMetalWindowController {
|
||||
if isFullScreenAutoCapture {
|
||||
captureMouse()
|
||||
}
|
||||
saveDynamicResolution()
|
||||
}
|
||||
|
||||
func windowDidExitFullScreen(_ notification: Notification) {
|
||||
@@ -427,7 +426,6 @@ extension VMDisplayQemuMetalWindowController {
|
||||
if isFullScreenAutoCapture {
|
||||
releaseMouse()
|
||||
}
|
||||
saveDynamicResolution()
|
||||
}
|
||||
|
||||
func windowDidBecomeMain(_ notification: Notification) {
|
||||
@@ -476,8 +474,8 @@ extension VMDisplayQemuMetalWindowController {
|
||||
}
|
||||
if resolution.isFullscreen && !isFullScreen {
|
||||
window.toggleFullScreen(self)
|
||||
} else if resolution.size != .zero {
|
||||
_ = self.updateGuestResolution(for: window, frameSize: resolution.size)
|
||||
} else if let vmDisplay = vmDisplay, resolution.size != .zero {
|
||||
vmDisplay.requestResolution(CGRect(origin: .zero, size: resolution.size))
|
||||
} else {
|
||||
_ = self.updateGuestResolution(for: window, frameSize: window.frame.size)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user