
Show HN: Simple C library for an XBox Controller (Linux) for easy use in games - EllipticCurve
https://github.com/MauriceGit/XBox_Controller_Linux_Interface
======
danbolt
This is great! I like the straightforwardness of it.

I'm sure the user could find out the index values for each button on the
controller, but I'd be tempted to include an enum for each button so simplify
things for the user. It's certainly usable in its current form though.

------
gravypod
What is the "mt" prefix for?

~~~
EllipticCurve
I thought about some fancy, meaningful prefix. But in the end I decided, it
doesn't really matter as long as it's unique.

So mt stands for my name (Maurice Tollmien).

~~~
cyphar
> it doesn't really matter as long as it's unique.

It sort of does, because the library isn't called (or has the acronym) "mt".
Why not call it "xbox*" or something like that?

~~~
EllipticCurve
Because I needed an acronym that I also could use for the vector and
quaternion library. Especially for the vector library, as chance of conflict
is highest there.

~~~
exDM69
You really don't need to prefix everything with the same prefix everywhere,
even in C. Using a per-module prefix that is unlikely to clash is enough.

For your vector and quaternion libs... You should make them header only, all
static inline functions and perhaps with always_inline attribute if you care
about performance. This also removes any need for prefixes.

~~~
EllipticCurve
I won't continue that mt Prefix streak. Maybe I think of something better
later :)

That is a good idea, I will look into that, thanks!

------
Hydraulix989
Cool, does SDL already support the Xbox controller?

~~~
EllipticCurve
Possible, yes. But I'm not sure.

