Leave match results with the Menu key, as browsers keep Escape

The results prompt shows the Menu key instead of Esc, which a browser
uses to leave fullscreen. Escape still works on desktop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
shweetandClaude Opus 5.5 committed 2026-11-08 17:19:38 -05:00
1 parent 6951e16520
commit cdb0845da2
4 files changed
+19 -14

No files matched your search

+7 -2
View File
@@ -458,9 +458,14 @@ void Ui::match_draw(Game& game)
float y = BANNER_Y + game.text.line_height_get(FONT_SMALL, BANNER_SCALE);
if (isRace)
y = results_draw(game, y);
// The menu control leaves, as a browser keeps Escape for leaving fullscreen.
Binding menu = input.bindings[CONTROL_MENU];
char leave[TOOLTIP_LENGTH];
input.binding_name_get(isPad ? menu.pad : menu.key, isPad, leave, sizeof(leave));
if (!game.session.isActive)
{
text_center_draw(game, isPad ? "B: Sandbox" : "Esc: Sandbox", y, 1);
SDL_snprintf(text, sizeof(text), "%s: Sandbox", leave);
text_center_draw(game, text, y, 1);
break;
}
// Online, a queued game's players each say whether to play it again (listed under), or leave.
@@ -469,7 +474,7 @@ void Ui::match_draw(Game& game)
Binding binding = input.bindings[CONTROL_READY];
char key[TOOLTIP_LENGTH];
input.binding_name_get(isPad ? binding.pad : binding.key, isPad, key, sizeof(key));
SDL_snprintf(text, sizeof(text), "%s: Play Again Esc: Leave", key);
SDL_snprintf(text, sizeof(text), "%s: Play Again %s: Leave", key, leave);
text_center_draw(game, text, y, 1);
y += LINE_HEIGHT * 2;
}