Reported: pressing the A button on the Controls page did nothing — except when you opened that page from the pause menu, in which case it silently resumed the game instead. Same button, same screen, two completely different outcomes depending on how you got there.
The cause was a flag doing double duty. paused stays true the
entire time the Controls page is open from pause — on purpose, so that leaving
Controls knows to return you to your paused game rather than dumping you back at the main
menu. But the pause menu's own confirm-button handling was gated on that flag alone, with no
check for which screen was actually visible. So even while the Controls page was on screen,
the invisible pause menu underneath was still very much alive and still consuming every A
press.
Button input here is read once per frame, and whichever check runs first "claims" that press for the frame — so the pause menu's check, running first, was eating the input before the Controls page's own handler ever got a turn. From the player's side that looked like pressing A on a clearly-focused "back to game" button and having it click a completely different, invisible button instead.
The fix adds the one condition that was missing — the pause menu's input handling now also requires that gameplay itself is the thing on screen, matching the same condition the pause-menu buttons already use to decide whether they're even visible. That makes the two screens' input handling mutually exclusive by construction: one requires gameplay to be visible, the other requires it not to be. There's no longer a frame where both are listening.