X Tutup
Skip to content

In local sessions, pause the race when the window leaves focus.#5660

Open
Big-Blue-Gnu wants to merge 2 commits intosupertuxkart:masterfrom
Big-Blue-Gnu:master
Open

In local sessions, pause the race when the window leaves focus.#5660
Big-Blue-Gnu wants to merge 2 commits intosupertuxkart:masterfrom
Big-Blue-Gnu:master

Conversation

@Big-Blue-Gnu
Copy link

@Big-Blue-Gnu Big-Blue-Gnu commented Mar 5, 2026

If you were ever in the middle of a game and you accidentally alt-tabbed out or an application suddenly popped up to steal the focus, chances are you have lost some progress by the time you returned in haste. This change adds a mechanism intended for non-networked sessions. The mechanism, which is triggered when the player is in a race, opens the pause menu and has the same effect as pressing Esc on the keyboard. I only tested the feature on Linux Mint, on which I report no regressions. Non-Linux versions may need testing.

Agreement

By creating a pull request in stk-code, you hereby agree to dual-license your contribution as
GNU General Public License version 3 or any later version and
Mozilla Public License version 2 or any later version.

This includes your previous contribution(s) under the same name of contributor.

In local sessions, pause the race when the game loses focus.
Declare the phase variable inside the condition. No need to have it outside if it goes unused.
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.

1 participant

X Tutup