Skip to content

Toggling fullscreen multiple issues on native targets (Hashlink / Windows) #2081

Description

@twilson90

I'm observing a variety of weird behaviours when I toggle fullscreen (using alt+Enter) on Windows with specific projects.

In one of my own projects using the latest release of Lime (8.3.2), the first thing I noticed was when I maximized the window and tried toggling fullscreen. The fullscreen boolean state was not updating on the first toggle when I set fullscreen true.

So when I would toggle fullscreen multiple times:

1st toggle: Fullscreen = ON
2nd toggle: Fullscreen = Still ON
3rd toggle: Fullscreen = OFF

I thought this might be related to the other issue (#2080) with the maximize fullscreen, but if I go back to older versions of OpenFl and Lime, this issue persists, so it's probably been around for a while.
This is observable in every project I've tried compiling.

But when I tried demoing PiratePig, I got some really weird stuff happening.
It would almost randomly go to complete black on toggling fullscreen.
If I toggle fullscreen really fast, eventually it would get stuck in this black state.
Other times, I could predictably trigger the black state by simply moving the window a little bit or resizing it before pressing alt+enter...

fullscreen on -> black screen
fullscreen off -> window
move window
fullscreen on -> no black, renders correctly
fullscreen off -> window
move window
fullscreen on -> black screen
fullscreen off -> window
etc...

If I didn't move the window between cycles, then it would continue to get stuck in a black state when toggling fullscreen on.

I can't recreate this behaviour in any other project, just PiratePig oddly! Maybe because it's static, no movement, so it's not triggering a render? But I've managed within the black state to still interact with the game and create a line of 3 blocks and it still remained black.

I couldn't record it in Windows (when the screen would go black it would get stuck in this state in a recording) so I had to setup my Phone to record the screen for a more accurate representation. I couldn't capture the whole screen due to lack of desk space but you can still observe the strange behaviour:

out.mp4

(at 0:23 I maximize the window and it starts to do something slightly different to before)

I managed to recreate the same behaviour in other OpenFl samples besides PiratePig, notably the ones with out any movement on screen, like TextAlignment and TextMetrics

If I use the develop branch of Lime, I get the black screen a lot less frequently and it's not at all predictable, it can take a minute (or several) of toggling until it eventually happens.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions