Fixing detected gamepad in some games

Should the mouse still work with this configuration? I am able to get gamepad support in emulationstation with this code but it will not detect the mouse. See this thread for more details. Any other ideas to fix would be greatly appreciated!