I tested the commits with my own system. The behavior of selecting weapons in the menu matches that of nxengine-evo and Cave Story Engine 2 used in Cave Story for Nintendo DS v0.3a by rain.
Now, selecting a machine gun in the menu by pressing fire fires machine gun in nxengine-evo, CSE 2, and nxengine-libretro. But, selecting other weapons in the menu by pressing fire doesn't fire the weapons.
The two commits are backports from nxengine-evo.
Without nxengine-evo, I wouldn't know what to do.
I tested the commits with my own system. The behavior of selecting weapons in the menu matches that of nxengine-evo and Cave Story Engine 2 used in Cave Story for Nintendo DS v0.3a by rain.
Now, selecting a machine gun in the menu by pressing fire fires machine gun in nxengine-evo, CSE 2, and nxengine-libretro. But, selecting other weapons in the menu by pressing fire doesn't fire the weapons.
This closes https://github.com/libretro/nxengine-libretro/issues/21