mdqinc / SDL_GameControllerDB

A community sourced database of game controller mappings to be used with SDL2 Game Controller functionality

Home Page:http://libsdl.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrobit SEGA Saturn controller seems to have incorrect shoulder button mapping

Kazade opened this issue · comments

In the controllerdb file it's listed as having triggers and shoulder buttons - I'm not sure if there's a version that has both, but mine only has buttons. The left button seems to be mapped to left shoulder, and the right shoulder seems to be mapped to the left trigger. This mapping works properly for me (left and right shoulders map to shoulder buttons):

03000000790000001100000011010000,Sega Saturn,a:b1,b:b2,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b6,rightshoulder:b7,start:b9,x:b0,y:b3,platform:Linux,

But I'm unsure if this will break something else 🤷

Please refer to the Sega mapping on the mapping guide image.

If the mapping is still wrong, feel free to update your PR.

Hmm... OK so it appears it's working as intended... I have a couple of questions though...

  1. What's the rationale for making the right shoulder button correspond to the left trigger, rather than the right shoulder button?
  2. I'm writing a racing game, and this mapping obviously doesn't work at all in a situation where left trigger/shoulder is brake, and right trigger/shoulder is accelerate. Is there a way to detect which mapping (sega, nintendo etc.) a controller is using?

What's the rationale for making the right shoulder button correspond to the left trigger, rather than the right shoulder button?

The modern standard for six button controllers as canonized by Capcom software and Hori hardware.
https://www.google.com/search?q=fightpad+controller&tbm=isch

Is there a way to detect which mapping (sega, nintendo etc.) a controller is using?

SDL offers SDL_GameControllerTypeForIndex.

I personally maintain a list of device types by vendor and product ID that correlates to the mappings in this community db but have not developed a drop-in solution for use with SDL, so you'll have to handle parsing of that data yourself if you want to use it. Note that this list excludes the data already available through SDL.

The best general solution is to allow players to remap controls to their preference.