We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
ScreenSizeInFullscreen
As there is a fullscreen mode on browsers, ScreenSizeInFullscreen should return a monitor size instead of a window frame size.
diff --git a/internal/ui/ui_js.go b/internal/ui/ui_js.go index a73dd24c4..93f206b9a 100644 --- a/internal/ui/ui_js.go +++ b/internal/ui/ui_js.go @@ -99,6 +99,7 @@ func init() { var ( window = js.Global().Get("window") document = js.Global().Get("document") + screen = js.Global().Get("screen") canvas js.Value requestAnimationFrame = js.Global().Get("requestAnimationFrame") setTimeout = js.Global().Get("setTimeout") @@ -119,7 +120,7 @@ func init() { } func (u *userInterfaceImpl) ScreenSizeInFullscreen() (int, int) { - return window.Get("innerWidth").Int(), window.Get("innerHeight").Int() + return screen.Get("width").Int(), screen.Get("height").Int() }
As this is a breaking-change, I'll introduce the fix to v3.
The text was updated successfully, but these errors were encountered:
ebiten: update comment about ScreenSizeInFullscreen for browsers
7b8ae76
Updates #2145
We can deprecate this function by #1835
Sorry, something went wrong.
#2795 (*Monitor).Size can return this value.
(*Monitor).Size
ebiten: add (*Monitor).Size() to replace ScreenSizeInFullscreen()
ce82550
Closes #2145 Closes #2795
9e00a33
f4029aa
No branches or pull requests
As there is a fullscreen mode on browsers,
ScreenSizeInFullscreen
should return a monitor size instead of a window frame size.As this is a breaking-change, I'll introduce the fix to v3.
The text was updated successfully, but these errors were encountered: