Skip to content

Carry seedds/nxnative#665: fullscreen for a game opened from a fullscreen app - #219

Merged
v0lumehi merged 2 commits into
mainfrom
v0lumehi/fullscreen-after-space
Oct 29, 2026
Merged

v0lumehi merged 2 commits into
mainfrom
v0lumehi/fullscreen-after-space

Conversation

@v0lumehi

@v0lumehi v0lumehi commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What and why

A Mac game started with DM_FULLSCREEN=1 from the launcher's console mode, which is itself in macOS fullscreen, comes up as a window. @LNPANDY found it while building fullscreen for console mode: "using a full screen app to launch another full-screen app will fail, it will automatically switch to windowed mode".

The launcher lives in its own fullscreen Space, so opening the game makes macOS leave that Space. The game asked for fullscreen on the next run-loop turn, when its window was not yet on the active Space (a harness of two small apps logged isOnActiveSpace 0 there, the Space change arriving 0.3 to 0.5 s later), and AppKit can refuse a request made then. The fix waits until the app is active and the window is on the active Space, repeats a refused request once, and stops when the player toggles fullscreen themselves. g_fullscreen and screen_match_apply are unchanged. Full reasoning, the alternative (a borderless window) and the reference entry are in the upstream PR: seedds/nxnative#665.

This PR carries it as patch 0030 (Upstream-Status: forwarded seedds/nxnative#665). Its Issue: line names this PR, as there is no separate issue.

@LNPANDY could you try it from console mode once it is in a build? The failure itself did not reproduce here (see below), so your confirmation is what counts.

Checked

  • Tests: python3 scripts/patches.py check passes, python3 -m unittest discover -s scripts/tests passes (39 tests), make -C dm/host GAME=010015100B514000 builds, make -C dm/host/tests GAME=010015100B514000 run passes. The patch applied cleanly onto current main.
  • Visual QA: not a UI change.
  • Run on a device or Mac: the harness only (macOS 27, Apple silicon, built-in and external display). The old request was taken every time even at isOnActiveSpace 0, so the refusal is not reproduced. With the change the request waited for the Space change and then entered fullscreen. The host itself was built, not run in a Space transition, and no game was started with it.

Scope

@v0lumehi
v0lumehi force-pushed the v0lumehi/fullscreen-after-space branch 2 times, most recently from 7cb66b4 to a7a2dc5 Compare October 29, 2026 19:52
@v0lumehi
v0lumehi force-pushed the v0lumehi/fullscreen-after-space branch from a7a2dc5 to 8dc01ab Compare October 29, 2026 19:55
@v0lumehi

Copy link
Copy Markdown
Collaborator Author

Rebased onto main after #217. Patch renumbered to 0030-front-mac-enter-fullscreen-once-the-app-is-activ, patches.py check green.

@LNPANDY

LNPANDY commented Oct 29, 2026

Copy link
Copy Markdown
Owner

The host side of this is already validated on real hardware — see the data on seedds/nxnative#665 (a real game from console mode: 4/4 rolled back before, enters and holds with this code).

#220 (the launcher half) has been trimmed to launcher-only so it does not collide with this: the forced DM_FULLSCREEN=1 from console Play is necessary but not sufficient — with the old host the game still came up windowed — so both PRs are needed for the feature. Suggested order: #218 → #219 → #221 → #220 (mine last; it will rebase after #221 since both touch GameStart.environment).

… fullscreen once it is on the active Space

Forwarded patch for dm/host/front_mac.m and its reference entry.
@LNPANDY
LNPANDY force-pushed the v0lumehi/fullscreen-after-space branch from 8dc01ab to 94c2a9e Compare October 29, 2026 20:13
@v0lumehi
v0lumehi merged commit 142c3d8 into main Oct 29, 2026
9 checks passed
@v0lumehi
v0lumehi deleted the v0lumehi/fullscreen-after-space branch October 29, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants