mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 10:48:53 +01:00
glfw: Bug fix: Compilation error on Windows
This commit is contained in:
parent
ae84e79d16
commit
28665cfc4b
@ -203,6 +203,19 @@ func (w *Window) SetScrollCallback(cbfun ScrollCallback) (previous ScrollCallbac
|
||||
return nil // TODO
|
||||
}
|
||||
|
||||
func (w *Window) SetSizeCallback(cbfun SizeCallback) (previous FramebufferSizeCallback) {
|
||||
var gcb uintptr
|
||||
if cbfun != nil {
|
||||
gcb = windows.NewCallbackCDecl(func(window uintptr, width int, height int) uintptr {
|
||||
cbfun(theGLFWWindows.get(window), width, height)
|
||||
return 0
|
||||
})
|
||||
}
|
||||
glfwDLL.call("glfwSetWindowSizeCallback", w.w, gcb)
|
||||
panicError()
|
||||
return nil // TODO
|
||||
}
|
||||
|
||||
func (w *Window) SetIcon(images []image.Image) {
|
||||
gimgs := make([]glfwImage, len(images))
|
||||
defer runtime.KeepAlive(gimgs)
|
||||
|
Loading…
Reference in New Issue
Block a user