I had similar problem with Demolition Man in Opera-libretro, but I figured it out! There is a core option called Active Input Devices that is set to 1 by default. Set this to 2. This may be all you need, but here's more info about my setup in case it's helpful.
Demolition man requires both a gamepad and light gun. I setup the gamepad on port 1 and the light gun on port 2. The catch is that RetroArch port 2 is not setup to read my mouse (and typically I wouldn't want it to). My workaround solution for this is to setup RetroArch Port 5 (In Settings>Input>RetroPad Binds) as a mirror of Port 1. I can't foresee myself playing a 5-player game in RA so I don't need Port 5 for an actual 5th input. Port 5 now receives my gamepad-1 input as well as mouse and keyboard input for light guns. Now back in Quick Menu>Controls>Port 5 Controls, I have Device Type set to 3DO Lightgun and Mapped Port set to 2. Demolition Man now works great!
This Port 5 trick is helpful in other cases too, like older games that support a single player using 2 controllers. Perfect Dark on N64 is a good example. In-game, I can set the options for dual-controller mode, set Port 5 Controls>Mapped Port to 2, and I can play the game with my XBox controller in twin-stick mode like a modern FPS. Some input customization is needed, but that's all saved in my per-game config and it doesn't affect regular N64 games.