Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with engo.WindowSize and ScaleOnResize when minimized #689

Open
inkeliz opened this issue Dec 14, 2019 · 1 comment
Open

Problems with engo.WindowSize and ScaleOnResize when minimized #689

inkeliz opened this issue Dec 14, 2019 · 1 comment
Labels
Milestone

Comments

@inkeliz
Copy link
Contributor

inkeliz commented Dec 14, 2019

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.

@Noofbiz Noofbiz added the bug label Dec 16, 2019
@Noofbiz Noofbiz added this to the 1.1 milestone Dec 16, 2019
@inkeliz
Copy link
Contributor Author

inkeliz commented Jan 2, 2020

Disabling the glfw.AutoIconify fix that:

glfw.WindowHint(glfw.AutoIconify, 0)

However, it also prevent from minimize the window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants