This should actually be quite simple. You only need one profile but two different files. If the user selects the steering wheel, load/save the profile in the steering wheel file and the gamepad file for the gamepad. You can use the name of the device. You can also test it in the demo. There you can enter the file name when mapping.