Aloshi / EmulationStation

A flexible emulator front-end supporting keyboardless navigation and custom system themes.
MIT License
2.07k stars 905 forks source link

gamepad detected but unresponsive in es, but works in retroarch #254

Closed GM-Script-Writer-62850 closed 9 years ago

GM-Script-Writer-62850 commented 10 years ago

So i setup a old pc (dell optoplex 780) using the 64bit ubuntu 14.04 mini disk image i installed retroarch, lightdm, xorg, and emulationstation i then made a xsession script for emulationstation (start audio services than start es) well i can configrue my keyboard just fine, but it will not respond to the detected gamepad (yes it sees the gamepad, but will not repsond to the buttons on it) however when i launch retroarch via es my controller works i have done the same thing on my xubuntu system and it works just fine

nilsbyte commented 10 years ago

Did you install libudev-dev? Did you try it with another gamepad?

GM-Script-Writer-62850 commented 10 years ago

installed that and restarted lightdm, no effect tried my snes and 360 usb controllers they show up in /dev/input/ as js0, js1, etc

nilsbyte commented 10 years ago

You have to recompile ES after installing libudev-dev. Please delete the EmulationStation source and binary, download the source again with git and compile again.

GM-Script-Writer-62850 commented 10 years ago

i installed it via the deb download here http://www.emulationstation.org/downloads/releases/emulationstation_amd64_latest.deb

Aloshi commented 10 years ago

This might be an issue with SDL2 not recognizing the buttons for the gamepad.

nilsbyte commented 10 years ago

@GM-Script-Writer-62850 please try another gamepad and report

GM-Script-Writer-62850 commented 10 years ago

I may be able to check if libsdl* is installed Tuesday at the soonest (just got a full time job, woo-hoo money, too bad i can't sleep till 9-10am anymore) i tried both my game pads, a usb SNES and a official xbox 360 controller, the only programmable device was the keyboard both of which work on my main xubuntu install 14.04 install in es using the same deb package

GM-Script-Writer-62850 commented 10 years ago

correction, it is not working on my main ubuntu install when started via lightdm is there a process that needs to be running?

chad@M4A79XTD-EVO:~$ cat /usr/share/xsessions/emulationstation.desktop 
[Desktop Entry]
Version=1.0
Type=Application
Name=Emulation Station
Comment=
Exec=emulationstation-session
Icon=emulationstation
Path=
Terminal=false
StartupNotify=false
Categories=Game;
chad@M4A79XTD-EVO:~$ cat /usr/local/bin/emulationstation-session 
#!/bin/sh
start-pulseaudio-x11 > /tmp/es.log
pacmd set-card-profile 0 output:hdmi-stereo-extra1 >> /tmp/es.log
pacmd set-default-sink alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 >> /tmp/es.log
pactl set-sink-volume alsa_output.pci-0000_01_00.1.hdmi-stereo-extra1 0x91d6 >> /tmp/es.log
xfce4-volumed
while [ ! -f "$HOME/.config/retroarch/retroarch.cfg" ];do
    sleep 0.05
done
emulationstation
GM-Script-Writer-62850 commented 10 years ago

i got it to work in a xfce4 session, but i had to add a couple seconds of sleep what needs to happen in these few seconds? for me to use my session i seem to have to make this happen manually

GM-Script-Writer-62850 commented 10 years ago

How does ES go about reading the input from a controller? i want to try to make a lightdm session just for ES, adding sleep does not help in this case is there a running process it watches?

Aloshi commented 10 years ago

ES reads the input through SDL2's Raspberry Pi driver, which I believe uses evdev events for input.

GM-Script-Writer-62850 commented 10 years ago

What about on a 64bit debian based install? i just managed to get it setup nice on a minimal lubuntu install (not even a GUI text editor minimal) is there something i cat and pipe into es? eg: cat /dev/input/js* | emulationstation

Aloshi commented 10 years ago

I'm not sure, you'd have to look through SDL2's code. I think it'll use whatever events go through X. As far as I know you can't pipe them into ES like that.

GM-Script-Writer-62850 commented 10 years ago

well i found out the process that is required for it to read the button presses apparently it is the window manager (xfwm4, openbox, etc.) guess my minimal lubuntu base will be fine