How do I toggle FullScreen/Windowed without crashing ?

  • Hey guys !

    I've bumped into a major and consistent crash problem after compiling my project. It is related to a new functionality that was supposed to enable/disable FullScreen in the Parameters Menu of my game.

    For information, I'm previewing my project using NW.js in C2, and it works like a charm.

    However the preview doesn't seem to be helping at all, because when the project is indeed exported... it doesn't work.

    • the game opens in FullScreen mode (but somehow he doesn't "realize" he's in full screen, cf the DebugBox in the files I'll link to)
    • if I ask him to go Window Mode (by using the Cancel FullScreen action of the Browser object) the game instantly crashes and I have to go CTRL+ALT+SUP to close nwjs.

    I don't know how to solve this. I've tried to :

    • cancel FullScreen as soon as the game loads, but it doesn't work
    • play with the Window Size using the Nw.js object, but it doesn't work.

    You can download both the preview mode and the Exported version of the simplified project here :

    The full export project (linux, osx, windows) : mediafire.com/file/jjs3u2w8ack3t7q/FullScreenTest.rar[/li]

    Thanks in advance for those who'll take the time to help me !

  • hi Semoreh i have tried your capx, and if i understand your problem, just try to export with "window frame" option enabled, instead of "kiosk mode"

  • Hi NN81 thanks for your answer.

    I exported without touching anything, so all three options (Window Frame, Rezisable Window, Kiosk Mode) were indeed enabled.

    I've tried to disable Kiosk Mode, and now the game doesn't open in FullScreen anymore but in Windowed. The FullScreen toggle then works just fine and there is no more crash. So this solves the problem ! Nice !

    Thanks a bunch !

    One last thing : can you explain what the Kiosk Mode is supposed to do ? Am I losing something by not enabling it in my project ?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi NN81 thanks for your answer.

    I exported without touching anything, so all three options (Window Frame, Rezisable Window, Kiosk Mode) were indeed enabled.

    I've tried to disable Kiosk Mode, and now the game doesn't open in FullScreen anymore but in Windowed. The FullScreen toggle then works just fine and there is no more crash. So this solves the problem ! Nice !

    Thanks a bunch !

    One last thing : can you explain what the Kiosk Mode is supposed to do ? Am I losing something by not enabling it in my project ?

    i think the answear is same spoked in the manual:

    Kiosk mode: use a "kiosk" display mode, where the app runs in fullscreen and tries to prevent the user from leaving.

    i think that with your windowed/fullscreen choice events, this cause the issue

  • It's indeed written in the manual and it explains everything, my bad. Thanks a lot for your help ! =)

    Case closed.

  • It's indeed written in the manual and it explains everything, my bad. Thanks a lot for your help ! =)

    Case closed.

    nevermind, even the manual is not too useful if you do not know exactly what to look for, That's why we post on the forum

    but once identified the problem is always instructive to deepen a bit

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)