mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-02-04 23:14:28 +01:00
Revert "internal/uidriver/glfw: bug fix: needed to set the window position after restoring from fullscreen"
This reverts commit99a15d81f4
. Reason: The true culprit was12c144070f
Updates #1975
This commit is contained in:
parent
99a15d81f4
commit
f76d1c8d50
@ -1251,16 +1251,6 @@ func (u *UserInterface) setWindowSizeInDIPImpl(width, height int, fullscreen boo
|
|||||||
|
|
||||||
if u.isNativeFullscreenAvailable() && u.isNativeFullscreen() {
|
if u.isNativeFullscreenAvailable() && u.isNativeFullscreen() {
|
||||||
u.setNativeFullscreen(false)
|
u.setNativeFullscreen(false)
|
||||||
|
|
||||||
// Reset the window size and the position explicitly (#1975).
|
|
||||||
// Polling an event is necessary to set the window size correctly
|
|
||||||
// after restoring from the fullscreen.
|
|
||||||
glfw.PollEvents()
|
|
||||||
ww := int(u.dipToGLFWPixel(float64(width), u.currentMonitor()))
|
|
||||||
wh := int(u.dipToGLFWPixel(float64(height), u.currentMonitor()))
|
|
||||||
u.window.SetSize(ww, wh)
|
|
||||||
|
|
||||||
// TODO: Set the window position correctly if possible.
|
|
||||||
} else if !u.isNativeFullscreenAvailable() && u.window.GetMonitor() != nil {
|
} else if !u.isNativeFullscreenAvailable() && u.window.GetMonitor() != nil {
|
||||||
if u.Graphics().IsGL() {
|
if u.Graphics().IsGL() {
|
||||||
// When OpenGL is used, swapping buffer is enough to solve the image-lag
|
// When OpenGL is used, swapping buffer is enough to solve the image-lag
|
||||||
|
Loading…
Reference in New Issue
Block a user