Skip to content

Shield Button Prompt for Old Configs

!2096 (merged) split the "Spin" control into separate "Spin" and "Shield Ability" controls. This merge request fixes #1152's last remaining task, by making it so that if config.cfg exists(!) and it's from v2.2.13 or earlier, the title screen will show you a pop-up when you press a button to open the main menu, asking whether you want to assign Shield Ability:

Image

The pop-up has a hidden one-second delay before you can accept/deny it, to avoid someone mashing past the pop-up without a chance to read it and getting worried about what it could have said.
The pop-up has three options: Opening P1's Control Setup menu to assign Shield Ability, matching the old behaviour by assigning Shield Ability to the same buttons as Spin, and leaving the Shield Ability buttons at their default.

With the latter, the old config might conflict with Shield Ability's default buttons. Therefore, it'll try to update the gamepad buttons with as few consequences as possible.
If B is set to Custom 1, Y is set to Custom 2, and LS is set to Custom 3 (like v2.2.10 to v2.2.13's defaults), then B will be updated to Shield Ability, Custom 1 will move from B to Y, Custom 2 will move from Y to LS, and Custom 3 will become unassigned (as automatically updating the rest of the configuration to make room for Custom 3 might upset people that were used to the old defaults).
Otherwise, if B is set to Next Weapon and X is set to Previous Weapon (like v2.2.0 to v2.2.9's defaults), then B will be updated to Shield Ability, Next Weapon will move from B to X, and Previous Weapon will become unassigned (for the same reason as above; plus you can select a previous weapon by just pressing Next Weapon multiple times).
Otherwise, Shield Ability will not be assigned to gamepads if Controls per Key is "One" (the default) in the config, or it'll share B with another control if Controls per Key is "Several".


SRB2 generally says "keyboard yellow, gamepads green", but colouring "B button" green instead of red felt very wrong to me, so I made it red instead. I did not change "X button" or "Y button" elsewhere from green to blue/yellow, though.

I considered increasing MINOREXECVERSION to check for old configs, but I didn't think that it was worth changing execversion from 55 to 65591 for this - it's already been incremented since v2.2.13, and people have played with the Shield button in nightly builds for a long time already by now.



TL;DR: If you've played SRB2 before v2.2.14, you'll see a pop-up asking whether you'd like to assign the new Shield Ability control

Edited by Zwip-Zwap Zapony

Merge request reports