Problems with engo.WindowSize and ScaleOnResize when minimized
inkeliz opened this issue · 1 comments
There's two issues noticed so far when you minimize the game (ALT + TAB) and return to the game.
Black Screen
If you use the follow RunOptions
:
opts := engo.RunOptions{
Title: "Test",
Fullscreen: true,
}
The game will have a "Black Screen" (or the color defined by common.SetBackground), so the content of the game willl not display anymore when you minimize and return to the game.
The fix for that is using ScaleOnResize: true
. Maybe we must enforce that FullScreen always set the ScaleOnResize
to true
.
WindowSize is 0, 0 when minimize:
While the game is minimized the engo.WindowSize will return 0, 0. It kind of makes sense, but it seems strange. Because it ignores the value of NotResizable. If the game is NotResizable
is expected that the size never changes. Also, it maybe could have another function like engo.IsMinimized()
, to pause the game (or slowdown the game) when it's hidden.
Disabling the glfw.AutoIconify
fix that:
glfw.WindowHint(glfw.AutoIconify, 0)
However, it also prevent from minimize the window.