Skip to content

Commit

Permalink
uidriver/glfw: Bug fix: Compile failure
Browse files Browse the repository at this point in the history
  • Loading branch information
hajimehoshi committed Sep 18, 2020
1 parent 51f0613 commit 28ce1fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/uidriver/glfw/ui_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ func (u *UserInterface) toGLFWPixel(x float64) float64 {
return x
}

func (u *UserInterface) toFramebufferPixel(x float64) float64 {
return x
}

func (u *UserInterface) adjustWindowPosition(x, y int) (int, int) {
return x, y
}
Expand Down
5 changes: 5 additions & 0 deletions internal/uidriver/glfw/ui_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ func (u *UserInterface) toGLFWPixel(x float64) float64 {
return x * u.deviceScaleFactor()
}

// toFramebufferPixel must be called from the main thread.
func (u *UserInterface) toFramebufferPixel(x float64) float64 {
return x
}

func (u *UserInterface) adjustWindowPosition(x, y int) (int, int) {
mx, my := currentMonitor(u.window).GetPos()
// As the video width/height might be wrong,
Expand Down

0 comments on commit 28ce1fc

Please sign in to comment.