Skip to content

Commit

Permalink
Clarity from review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jul 9, 2024
1 parent 2b57012 commit 145674c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/driver/glfw/window_desktop.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@ func (w *window) getMonitorForWindow() *glfw.Monitor {

func (w *window) detectScale() float32 {
if build.IsWayland { // Wayland controls scale through content scaling
return 1.0
return 1
}
monitor := w.getMonitorForWindow()
if monitor == nil {
return 1.0
return 1
}

widthMm, heightMm := monitor.GetPhysicalSize()
if runtime.GOOS == "linux" && widthMm == 60 && heightMm == 60 { // some sort of failure - mostly on Steam Deck
if runtime.GOOS == "linux" && widthMm == 60 && heightMm == 60 { // Steam Deck incorrectly reports 6cm square!
return 1
}
widthPx := monitor.GetVideoMode().Width
Expand Down

0 comments on commit 145674c

Please sign in to comment.