Teaching SDL about the 8bitdo N30 arcade stick

Hi,

How do I teach SDL about my 8bitdo N30 arcade stick? It has guid = 03000000c82d00008010000000000000 and is not (yet) listed at

https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt

In particular, I’m not sure how to define the buttons. The hat seems self explanatory.

The arcade stick has the A, B, X, Y buttons mirrored compared to, say, Nintendo joysticks. It also has a start, select and R1, L1, R2, L2 buttons which I’m not sure how to name in the given string.

Should I use the labels A, B, X, Y, R1, L1, R2, L2, start and select as-is?

The layout is something like this:

^ X Y R1 L1
A B R2 L2

where ^ is the hat.

And, after figuring all that out, at what time is it appropriate to use SDL_GameControllerAddMappingsFromRW() and friends? Before SDL_Init() or immediately after it?

And if I do this correctly, will it work to use SDL_GameControllerOpen() on it? I believe that failed before, but my memory is a bit hazy on that. I’ll need to do more experiments.