This PR fixes the switch to fullscreen mode which does not happen immediately on Web. The related emscripten functions are re-implemented in "renpy-pre.js" with the following changes:
check navigator.userActivation.isActive on browsers that support it to know if the fullscreen request can be performed now and needs to be defer to next input event.
always perform the fullscreen request now on browsers that implement requestFullScreen, and if it fails, try it again during the next input event.
Browsers that don't implement navigator.userActivation.isActive (all but Firefox) do implement requestFullScreen (all but Safari on iOS) so that should cover all recent browsers.
This PR and a related one in renpy should fix the issues in renpy/renpy#4760.
This PR fixes the switch to fullscreen mode which does not happen immediately on Web. The related emscripten functions are re-implemented in "renpy-pre.js" with the following changes:
navigator.userActivation.isActive
on browsers that support it to know if the fullscreen request can be performed now and needs to be defer to next input event.requestFullScreen
, and if it fails, try it again during the next input event.Browsers that don't implement
navigator.userActivation.isActive
(all but Firefox) do implementrequestFullScreen
(all but Safari on iOS) so that should cover all recent browsers.This PR and a related one in renpy should fix the issues in renpy/renpy#4760.