| Age | Commit message (Collapse) | Author |
|
ControllerInterface: enable hotplugging on macOS
|
|
|
|
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
|
|
Make analog triggers on PS3 controllers accessible on Mac
|
|
Previously the 'usage' value was used to identify the axis by name, but this is not unique. For example on a PS3 controller *all* axis other than the well known ones return a usage of '1' so there are 30 or more axis all named "1". This stops things such as analog triggers being usable.
Using the element cookie uniquely identifies each axis and allows them to be assigned successfully as controls
|
|
|
|
This makes the device ID assigning code common to all backends, by
moving it to AddDevice() instead of copy-pasting or replicating
the logic in the backends.
Also, to prepare for hotplugging, instead of relying on a name usage
count, the new ID assigning system always starts from ID 0 and tries
to assign the first ID that is not used.
|
|
|
|
Small cleanup by using std::shared_ptr and getting rid of
ciface.Devices() which just returned the m_devices (which defeats the
point of making m_devices protected).
Incidentally, this should make the code safer when we have
different threads accessing devices in the future (for hotplug?).
A lot of code use Device references directly so there is
no easy way to remove FindDevice() and make those unique_ptrs.
|
|
Previously, the devices vector would be passed to all backends. They
would then manually push_back to it to add new devices. This was fine
but caused issues when trying to add synchronisation.
Instead, backends now call AddDevice() to fill m_devices so that it is
not accessible from the outside.
|
|
|
|
|
|
|
|
|
|
Previously, MacOpenFile only overrode anything on OS X; otherwise it was
just a useless method, which is presumably why it wasn't marked override
in the first place. Address this more sanely by wrapping it in #ifdef
__APPLE__.
|
|
|
|
|
|
The return values here have never been checked, so it doesn't make sense
to return a value to begin with.
|
|
Make the implementation here a bit easier.
|
|
Gets rid of function prototype warnings.
|
|
All because someone didn't actually return the wxWindow handle for the edge case.
|
|
|
|
to use it.
Fixes an off by 1 issue related to double->float->double conversion, and eliminates numerous warnings.
|
|
|
|
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
|
|
|
|
|
|
ie. uses spaces for alignment.
|
|
|
|
|
|
|