Skip to content

Conversation

@cdrch
Copy link

@cdrch cdrch commented Jul 31, 2021

Fixes a problem introduced with the addition of fullscreen. Previously, the pointer placement had been incorrectly scaled due to the scale constantly resetting, which was caused by an incorrect call to fullscreenEnabled, which checks whether or not a browser can support fullscreen, rather than if it is currently. It has been replaced in this PR with checking if there are any current elements of the page in fullscreen; if none (document.fullscreenElement != null), then it is considered not fullscreen. Otherwise, it is.

This should fix #65 and potentially help with solving #33.

Update: found other areas of code with the same issue. Flappy Fairy now goes properly fullscreen. Fixes #45 and #78.

Fullscreen games now work properly with modern browsers.
@cdrch cdrch mentioned this pull request Jul 31, 2021
bsorrentino added a commit to bsorrentino/ga that referenced this pull request Aug 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Button click area problems The Fullscreen feature...

1 participant