2013-06-02, 03:47
(2013-06-01, 19:23)buymeapc Wrote: I would like to say what a great job has been done on this add-on. Absolutely fantastic!
One question, though:
I'm using an XBox 360 controller to control XBMC and RCB. When I fire up a rom and I'm ready to quit the emulator and return to XBMC, is there a way I can close the emulator with my controller? I did some research into using the guide button (big X button), but that seems like a dead end since the driver doesn't work too well and makes my XBMC go crazy scrolling. I don't have a keyboard accessible either. Do you have any advice/suggestions?
I'm currently doing this and it works for me in linux. Instead of using the kernel space driver, i use the user space drive xboxdrv. I launch it with the following to allow 4 controls and to properly control the lights on them...
Code:
sudo xboxdrv --daemon --wid 0 -l 2 --ui-buttonmap guide=KEY_ESC --dpad-as-button --trigger-as-button --deadzone 12000 --next-controller --wid 1 -l 3 --ui-buttonmap guide=KEY_ESC --dpad-as-button --trigger-as-button --deadzone 12000 --next-controller --wid 2 -l 4 --ui-buttonmap guide=KEY_ESC --dpad-as-button --trigger-as-button --deadzone 12000 --next-controller --wid 3 -l 5 --ui-buttonmap guide=KEY_ESC --dpad-as-button --trigger-as-button --deadzone 12000 >/dev/null 2>/dev/null &
There is alot going on here I know but I built the command to press esc when the X is pressed. I then launch the emulators to exit upon esc. I also stop lirc so keys dont get queued during a game and I pause the thread xbmc runs on so the xbox control doesnt keep controlling xbmc while in the emulator. For example with gens...
Code:
#!/bin/bash
xbmc-send -a "LIRC.Stop"
sudo killall -STOP xbmc.bin
gens --fs --quickexit "$1"
sudo killall -CONT xbmc.bin
xbmc-send -a "LIRC.Start"
Using the above plus my recommendation from a few posts ago to stop the alsa sink before launch and to restart on exit (http://forum.xbmc.org/showthread.php?tid...pid1434251) I have a perfectly working setup with four xbox 360 controls that will quit an emulator on the X being pressed. Additionally I dont have to use solo mode so when I press the X i am instantly dropped back to the games list to pick another. Cut on the ability to control xbmc from gamepads too and then you can navigate and control xbmc with the 360 control. Here's my keymap xml for the 360 remote...
Code:
<keymap>
<global>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="1">Up</button>
<button id="2">Down</button>
<button id="3">Left</button>
<button id="4">Right</button>
<button id="5">Select</button>
<button id="6">ParentDir</button>
<button id="7">FullScreen</button>
<button id="8">ContextMenu</button>
<button id="10">Info</button>
<button id="11">PageUp</button>
<button id="12">PageDown</button>
<button id="13">PreviousMenu</button>
<button id="14">XBMC.ActivateWindow(Settings)</button>
<button id="16">Mute</button>
<axis id="4" limit="+1">VolumeDown</axis>
<axis id="4" limit="-1">VolumeUp</axis>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="1">Up</button>
<button id="2">Down</button>
<button id="3">Left</button>
<button id="4">Right</button>
<button id="5">Select</button>
<button id="6">ParentDir</button>
<button id="7">FullScreen</button>
<button id="8">ContextMenu</button>
<button id="10">Info</button>
<button id="11">PageUp</button>
<button id="12">PageDown</button>
<button id="13">PreviousMenu</button>
<button id="14">XBMC.ActivateWindow(Settings)</button>
<button id="16">Mute</button>
<axis id="4" limit="+1">VolumeDown</axis>
<axis id="4" limit="-1">VolumeUp</axis>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="1">Up</button>
<button id="2">Down</button>
<button id="3">Left</button>
<button id="4">Right</button>
<button id="5">Select</button>
<button id="6">ParentDir</button>
<button id="7">FullScreen</button>
<button id="8">ContextMenu</button>
<button id="10">Info</button>
<button id="11">PageUp</button>
<button id="12">PageDown</button>
<button id="13">PreviousMenu</button>
<button id="14">XBMC.ActivateWindow(Settings)</button>
<button id="16">Mute</button>
<axis id="4" limit="+1">VolumeDown</axis>
<axis id="4" limit="-1">VolumeUp</axis>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="1">Up</button>
<button id="2">Down</button>
<button id="3">Left</button>
<button id="4">Right</button>
<button id="5">Select</button>
<button id="6">ParentDir</button>
<button id="7">FullScreen</button>
<button id="8">ContextMenu</button>
<button id="10">Info</button>
<button id="11">PageUp</button>
<button id="12">PageDown</button>
<button id="13">PreviousMenu</button>
<button id="14">XBMC.ActivateWindow(Settings)</button>
<button id="16">Mute</button>
<axis id="4" limit="+1">VolumeDown</axis>
<axis id="4" limit="-1">VolumeUp</axis>
</joystick>
</global>
<FullscreenVideo>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="1">BigStepForward</button>
<button id="2">BigStepBack</button>
<button id="3">StepBack</button>
<button id="4">StepForward</button>
<button id="5">Pause</button>
<button id="6">Stop</button>
<button id="8">OSD</button>
<button id="9">CodecInfo</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="5">Pause</button>
<button id="6">Stop</button>
<button id="8">OSD</button>
<button id="9">CodecInfo</button>
<button id="1">BigStepForward</button>
<button id="2">BigStepBack</button>
<button id="3">StepBack</button>
<button id="4">StepForward</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="1">BigStepForward</button>
<button id="2">BigStepBack</button>
<button id="3">StepBack</button>
<button id="4">StepForward</button>
<button id="5">Pause</button>
<button id="6">Stop</button>
<button id="8">OSD</button>
<button id="9">CodecInfo</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="1">BigStepForward</button>
<button id="2">BigStepBack</button>
<button id="3">StepBack</button>
<button id="4">StepForward</button>
<button id="5">Pause</button>
<button id="6">Stop</button>
<button id="8">OSD</button>
<button id="9">CodecInfo</button>
</joystick>
</FullscreenVideo>
<VideoOSD>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="8">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="8">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="8">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="8">Back</button>
</joystick>
</VideoOSD>
<FullscreenInfo>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="10">Back</button>
</joystick>
</FullscreenInfo>
<MovieInformation>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="10">Back</button>
</joystick>
</MovieInformation>
<SongInformation>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="10">Back</button>
</joystick>
</SongInformation>
<MusicInformation>
<joystick name="Xbox Gamepad (userspace driver)">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #2">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #3">
<button id="10">Back</button>
</joystick>
<joystick name="Xbox Gamepad (userspace driver) #4">
<button id="10">Back</button>
</joystick>
</MusicInformation>
</keymap>
See, it is actually not a dead end at all. Enjoy!