[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Steam Controller



It works for me on both Windows and Linux, although it seems to work a lot better under Windows. It only works when steam is running, and really only works when steam launches your game. Steam does let you add shortcuts to non-Steam games, and when you launch through the shortcut, the controller works, but only in the window that was just launched.

You also need to configure the controller as a gamepad in the big picture mode as well.

I've tested this using pygame on Linux, and pygame_sdl2 on Linux and Windows.

Basically, this is a "Steam" controller in a literal sense - it's hard to use it with games that are outside of the Steam environment.

On Wed, Oct 21, 2015 at 7:21 PM Bartosz Debski <bartosz@xxxxxxxxxxxx> wrote:
Hi All,

I know this is quite fresh but if anyone wonders do Steam Controller works with PyGame?
Well answer is a NO at the moment. I have tested it on Win and on Linux. Results are the same.


>>> import pygame
>>> pygame.init() Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂÂ
(6, 0) Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>>> pygame.joystick.init() Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
>>> pygame.joystick.get_count() Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ÂÂ
0

Some of Linux dmesg
[ 3144.851372] usb 7-3: new full-speed USB device number 6 using ohci-pci
[ 3145.005095] usb 7-3: New USB device found, idVendor=28de, idProduct=1142
[ 3145.005103] usb 7-3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 3145.005108] usb 7-3: Product: Steam Controller
[ 3145.005111] usb 7-3: Manufacturer: Valve Software
[ 3145.012350] input: Valve Software Steam Controller as /devices/pci0000:00/0000:00:13.0/usb7/7-3/7-3:1.0/0003:28DE:1142.000F/input/input14
[ 3145.012525] hid-generic 0003:28DE:1142.000F: input,hidraw0: USB HID v1.11 Keyboard [Valve Software Steam Controller] on usb-0000:00:13.0-3/input0
[ 3145.018076] hid-generic 0003:28DE:1142.0010: hiddev0,hidraw1: USB HID v1.11 Device [Valve Software Steam Controller] on usb-0000:00:13.0-3/input1
[ 3145.025307] hid-generic 0003:28DE:1142.0011: hiddev0,hidraw2: USB HID v1.11 Device [Valve Software Steam Controller] on usb-0000:00:13.0-3/input2
[ 3145.032304] hid-generic 0003:28DE:1142.0012: hiddev0,hidraw3: USB HID v1.11 Device [Valve Software Steam Controller] on usb-0000:00:13.0-3/input3
[ 3145.039105] hid-generic 0003:28DE:1142.0013: hiddev0,hidraw4: USB HID v1.11 Device [Valve Software Steam Controller] on usb-0000:00:13.0-3/input4

Looks like drivers for controller are provided with Steam client as controller kind of works when you are logged into Steam. This mimics keyboard and mouse which sort some of the problems.

I have full controller support in my game and as long as gamepad is recognised by system then pygame can make use of it. Seems like we need to wait for OS level support for it as i got nothing on system level for it.

I have tested also on Super Meat Boy (standalone, non-steam, Linux) and gamepad works only if Steam is running as well, so this is broader issue and not just pygame.

Thought I share my findings.

Cheers
Bart