| Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
Rewrite GetXInputGUIDS to use SetupAPI instead of WMI Queries. When
using a language pack where the system language and user/program
language differ, Windows starts taking a VERY long time (10+ seconds)
to complete Queries for Win32_PNPEntity objects (it's probably
translating every single string since it transfers every single one
from the WMI server into memory in the program).
Fixes Issue 9744.
|
|
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.
|
|
|
|
Fixes issue 8673.
|
|
|
|
|
|
|
|
|
|
of the original hwnd.
|
|
The return values here have never been checked, so it doesn't make sense
to return a value to begin with.
|
|
|
|
The LEDs feature doesn't actually do anything: the SetState method is
entirely commented out.
|
|
|
|
to use it.
Fixes an off by 1 issue related to double->float->double conversion, and eliminates numerous warnings.
|
|
This is to remain compatible with XBCD devices.
|
|
from dolphin code.
Wrap dinput.h in a header defining DIRECTINPUT_VERSION instead of repeating it multiple places.
|
|
strictStrings is not supported by debug libraries, and indeed breaks the build.
Drop wbemidl.h (incompatible with strictStrings) dependency by using SDL-style search for XInput GUIDs.
|
|
Also moved && and || to ends of lines instead of start.
Fixed misc vertical alignments and some { needed newlining.
|
|
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
|
|
- remove unused variables
- reduce the scope where it makes sense
- correct limits (did you know that strcat()'s last parameter does not
include the \0 that is always added?)
- set some free()'d pointers to NULL
|
|
|
|
|
|
|
|
|
|
|
|
|
|
that litter this section of the codebase.
Also clean up a little bit of the comments that describe the interface classes.
|
|
|