mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
internal/ui: refactoring: remove unused functions
This commit is contained in:
parent
491b578866
commit
84030a3f77
@ -1640,25 +1640,6 @@ func (u *userInterfaceImpl) setWindowTitle(title string) {
|
||||
u.window.SetTitle(title)
|
||||
}
|
||||
|
||||
// forceToRefreshIfNeeded forces to refresh the framebuffer by resizing the window quickly.
|
||||
// This is a very dirty but necessary hack for DirectX (#2050).
|
||||
// With DirectX, the framebuffer is not rendered correctly when the window is resized by dragging
|
||||
// or just after the resizing finishes by dragging.
|
||||
// forceToRefreshIfNeeded must be called from the main thread.
|
||||
func (u *userInterfaceImpl) forceToRefreshIfNeeded() {
|
||||
if !u.graphicsDriver.IsDirectX() {
|
||||
return
|
||||
}
|
||||
|
||||
x, y := u.window.GetPos()
|
||||
u.window.SetPos(x+1, y+1)
|
||||
glfw.PollEvents()
|
||||
time.Sleep(time.Millisecond)
|
||||
u.window.SetPos(x, y)
|
||||
glfw.PollEvents()
|
||||
time.Sleep(time.Millisecond)
|
||||
}
|
||||
|
||||
// isWindowMaximized must be called from the main thread.
|
||||
func (u *userInterfaceImpl) isWindowMaximized() bool {
|
||||
return u.window.GetAttrib(glfw.Maximized) == glfw.True && !u.isNativeFullscreen()
|
||||
|
Loading…
Reference in New Issue
Block a user