Repository navigation
Console mode: the pointer stays hidden while a game starts (#380) - #741
Merged
Merged
Conversation
Three things showed the pointer between the console and a game started from it: - The window leaves full screen before the game opens, and the pointer, no longer over the smaller window, came back for the whole "preparing" time. ConsolePointer now holds a hidden pointer while a game starts, until the game has quit or did not start; movement, a click or a scroll still show it. - LaunchServices activating the game shows the pointer for up to 150 ms, whatever the game hid. With the pointer hidden the console now yields the front to the game (macOS 14 and later), and the game activates itself. - The game hid the pointer only after it had taken the front. Patch 0073 hides it right after NSApplication is created and activates from the run loop. Measured with Balatro (1.1.3) from console mode in a build of this branch: no pointer from Play until the game's picture, in two starts, where the first start before this change showed it for about 9 s. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…er-flash # Conflicts: # patches/series
…er-flash # Conflicts: # patches/series
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
|
Merged, thank you @Haseenesss. The patch keeps the number 0075, which is the next free one on main. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix or feature
What and why
Fixes #380. Starting a game from console mode still showed the pointer, although #374 starts the game with
DM_CURSOR_HIDDEN=1. Measured with screen recordings of Balatro (0100CD801CE5E000), three things showed it:leaveFullScreenForGame). The pointer is then no longer over the smaller window, andConsolePointer's not-over rule showed it for the whole "preparing" time (about 9 s in the first start).PointerIdlenow hasheld: while a game starts from the console, a hidden pointer stays hidden outside the window. Movement, a click or a scroll still show it, and the hold ends when the game has quit or did not start (resumeFullScreenAfterGame) or the console ends.activates = falseandyieldActivation(toApplicationWithBundleIdentifier:), and the game activates itself (macOS 14 and later; macOS 13 keeps today's path). A started game that is not hiding the pointer is opened as before.NSApplicationis created, and activates the app from the run loop rather than in the middle of the setup: an app that takes the front while its main thread is busy still showed the pointer for a frame in 2 of 8 starts.The engine change goes to seedds/nxnative as a PR next. The patch says
pendinguntil then.Checked
cd frontend && swift teston this branch (rebased on main 8d13135): 749 tests, 0 failures. A first run on a busy machine had 8 failures that did not come back in the second run.python3 tools/engine.py check: 42 patches apply cleanly to upstream 777a5f6c618a. New tests:testAGameStartedWithThePointerHiddenGetsTheFrontYielded,testAHeldPointerStaysHiddenOutsideTheWindowUntilItMoves.LiveConsoleDriverdoes: before, 5 of 5 starts showed the pointer when the game took the front (35-220 ms). With the front yielded, the early hide and the activation from the run loop: 0 of 10.tools/try-localfrom this change on main 7ef881b (before the rebase), Balatro rebuilt in it, started from console mode with the pointer idle-hidden. Before the launcher change, the pointer came back when the window left full screen and stayed about 9 s. After it, 2 of 2 starts showed no pointer from Play until the game's picture.yieldActivation, it keeps today's path), a start with a controller instead of the keyboard, the end-to-end run on the rebased branch (the code is the same, the engine pin moved).Screenshots
None, no visible change.
Scope
dm/,scripts/,docs/,ref/) is added to the repository: a change there is a patch inpatches/(a commit inengine/, thentools/engine.py export, andtools/engine.py checkpasses), with itsUpstream-Statusforwarded seedds/nxnative#..., orpendinguntil that PR is open🤖 Generated with Claude Code