uidriver/glfw: Bug fix: Compile failure

This commit is contained in:
Hajime Hoshi 2020-09-19 01:32:33 +09:00
parent 51f06139a6
commit 28ce1fc3fb
2 changed files with 9 additions and 0 deletions

View File

@ -57,6 +57,10 @@ func (u *UserInterface) toGLFWPixel(x float64) float64 {
return x return x
} }
func (u *UserInterface) toFramebufferPixel(x float64) float64 {
return x
}
func (u *UserInterface) adjustWindowPosition(x, y int) (int, int) { func (u *UserInterface) adjustWindowPosition(x, y int) (int, int) {
return x, y return x, y
} }

View File

@ -114,6 +114,11 @@ func (u *UserInterface) toGLFWPixel(x float64) float64 {
return x * u.deviceScaleFactor() 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) { func (u *UserInterface) adjustWindowPosition(x, y int) (int, int) {
mx, my := currentMonitor(u.window).GetPos() mx, my := currentMonitor(u.window).GetPos()
// As the video width/height might be wrong, // As the video width/height might be wrong,