Fullscreen in html5 doesn't take all the screen

  • Hi there, i'm just starting with flixel.

    I tried to go fullscreen in html5 when pressing a button, the web browser is correcty going fullscreen but the game screen is not taking all of the screen space like so:

    Here's my project.xml for the windows tag:
    <window width="1280" height="720" fps="60" background="#000000" hardware="true" vsync="true" />
    <window if="html5" resizable="false" />

    If i set resizable to "true", then the game correctly takes all the screen space when going fullscreen, but it's also the case when not in fullscreen :, i want the game to be in 1280x720 when it's not in fullscreen.

    I tried to go fullscreen using js, but i get the same result as using "FlxG.fullscreen = true;", it seems the canvas tag enforces the 1280x720 resolution in the style property:
    <canvas width="1280" height="720" style="transform: translateZ(0px); width: 1280px; height: 720px;"></canvas>

    The versions i'm currently using:
    Flixel 4.5.1
    Lime 7.1.1
    OpenFl 8.5.1

    I'm a bit lost about how to manage to have the fullscreen to take all of the screen space, i did some research without finding anything about this issue.

    A while ago, i made some game using Openfl 5.1.5 and didn't encounter this issue.

    Thanks for reading :)

Log in to reply

Looks like your connection to HaxeFlixel was lost, please wait while we try to reconnect.