Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Razer, Mad Catz, and Nacon devices #34

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 60-steam-input.rules
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,15 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0188", MODE="0660
# Nacon PS4 Revolution Pro Controller
KERNEL=="hidraw*", ATTRS{idVendor}=="146b", ATTRS{idProduct}=="0d01", MODE="0660", TAG+="uaccess"

# Nacon Daija PS4 Arcade Stick
KERNEL=="hidraw*", ATTRS{idVendor}=="146b", ATTRS{idProduct}=="0d09", MODE="0660", TAG+="uaccess"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDL already knows about this as a PS4 controller clone in src/joystick/controller_type.c, but not in src/joystick/SDL_gamepad_db.h.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On PS4 mode steam detects the controller, but the buttons are not mapped correctly. It thinks:

❌ -> ⭕
🔳 -> ❌
🔺 -> 🔳
⭕ -> nothing

With this change, the buttons on PS4 work correctly.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds like the kernel is providing the wrong mapping for this controller in the high-level (evdev) interface, which you're working around here by giving Steam access to the same controller via the lower-level hidraw interface, which it uses preferentially.

It would maybe be possible to address that with a SDL_gamepad_db.h change? That would be more reliably shipped to Steam users than changes in this repo.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised this change makes any difference to you, because #34 (comment) doesn't include a raw-hid device for the Daija, which would suggest that there's no hidraw device node for this rule to affect.

But maybe that was a mistake in the info provided in that comment?


# Razer Raiju PS4 Controller
KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1000", MODE="0660", TAG+="uaccess"

# Razer Raiju Ultimate PS4 Controller
KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1004", MODE="0660", TAG+="uaccess"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same. SDL calls this "Razer Raiju 2 Ultimate USB", do we know what its canonical name is?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to take #31 instead of this version, because #31 has it as both USB and Bluetooth.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#31 was merged, making this part unnecessary.


# Razer Raiju 2 Tournament Edition
KERNEL=="hidraw*", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="1007", MODE="0660", TAG+="uaccess"

Expand All @@ -81,6 +87,9 @@ KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8250", MODE="0660
# Mad Catz - Street Fighter V Arcade FightStick TE S+
KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8384", MODE="0660", TAG+="uaccess"

# Mad Catz - Street Fighter V Arcade FightStick TE2+
KERNEL=="hidraw*", ATTRS{idVendor}=="0738", ATTRS{idProduct}=="8481", MODE="0660", TAG+="uaccess"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SDL lists this one in both src/joystick/controller_type.c and src/joystick/SDL_gamepad_db.h.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This controller has the same situation as the Daija controller. Buttons are not mapped correctly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fixes that issue.


# Brooks Universal Fighting Board
KERNEL=="hidraw*", ATTRS{idVendor}=="0c12", ATTRS{idProduct}=="0c30", MODE="0660", TAG+="uaccess"

Expand Down