Skip to content

MacOS calling toggle_fullscreen or set_fullscreen from init() gets reset after couple frames #150

@pixelpusherninja

Description

@pixelpusherninja

On MacOS when calling toggle_fullscreen() or set_fullscreen() inside default.render_script in function init(self) gets overriden after a couple frames.

MacOS

Repro:

  1. create new Defold project from sample "Pixel Line Platformer"
  2. Add https://github.com/subsoap/defos/archive/refs/tags/v2.8.3.zip to your game.project
  3. Inside your default.render_script in function init(self) call either toggle_fullscreen() or set_fullscreen()
  4. Observe window temporarily flicker to fullscreen and then back to the windowed mode as defined in game.project

See logs from renderscript below. It starts in windowed mode, then we set fullscreen and then it goes back to windowed mode after few frames

Image

Windows

Repeat steps 1-3 from above and observe everything works as expected

See logs from renderscript for windows. It starts in fullscreen as expected

Image

game.project

[project]
title = test
dependencies#0 = https://github.com/subsoap/defos/archive/refs/tags/v2.8.3.zip

System

MacOS M2
Sequoia 15.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions