PS: here's the latest sample page with these fullscreen fixes: http://floooh.github.io/oryol/
Clicking on the samples, there are now 2 options: 'fullscreen' and 'expand', the latter is the soft-fullscreen mode which expands the canvas to the full browser window size. Unfortunately 'real' fullscreen mode still doesn't work on iOS Safari (I haven't debugged this yet), OSX Safari works fine though (this didn't work before). Cheers, -Floh. Am Donnerstag, 31. März 2016 21:08:52 UTC+2 schrieb Floh: > > Hi, > > I'm currently cleaning up my fullscreen switching code so that it also > works on Safari. There seems to be the 'simple' or 'old' way which is used > by the fullscreen-button on the standard HTML shell file which calls the > Module.requestFullscreen() function. This doesn't work on Safari though and > also doesn't provide a lot of control. > > Then there's juj's really cool set of fullscreen functions in the html5.h > header which allows full control over fullscreen switching behaviour and > also works on Safari. But instead from inside a registered C > event-handler-function (like mouse or keyboard input) I want to call this > when clicking an HTML element outside of the application, similar to what > the fullscreen button on the shell.html file does. > > What I'm currently doing is this: call a plain C function via cwrap() from > within the onclick-handler of an HTML element, which in turn calls > emscripten_request_fullscreen_strategy(). This doesn't work though since > inside emscripten_request_fullscreen_strategy() there's a check whether the > function is executed inside an event handler. 'Technically' it is, since it > is called from an onclick, however there's a > canPerformEventHandlerRequests() function which checks some internally set > variables (JSEvents.inEventHandler and > JSEvents.currentEventHandler.allowsDeferredCalls), and since these are not > set when something is simply called from within a button, nothing happens. > > I realize that I'm probably moving outside of the intended usage, and I do > have a workaround setting those inEventHandler variables before calling my > C function, but I wonder if there's an easier/cleaner way to do this (call > one of the html5.h function from inside a HTML element event handler)? > > Thanks! > -Floh. > > > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
