| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
You can safely read or write non-atomic integers on multiple threads,
as long as every thread reading or writing it holds the same mutex
while doing so (here, s_mutex).
Removing the atomic accesses makes the code faster, but the actual
performance difference is probably negligible.
|
|
If libusb fails to initialize, an assertion fails, but if that happens before the main window is created, then Dolphin just dies. Now, the panic alert is properly shown and the user can ignore it.
|
|
|
|
|
|
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
|
|
|
|
where appropriate. SerialInterface was a leftover from the past,
and makes no sense to be used on actual/real controllers.
|
|
Continues the migration of the logging calls over to the fmt capable
ones.
|
|
|
|
libusb_control_transfer call to fail.
|
|
libusb_control_transfer call.
|
|
|
|
Unfortunately, it appears that using libusb's synchronous transfer API
from several threads causes nasty race conditions in event handling and
can lead to deadlocks, despite the fact that libusb's synchronous API
is documented to be perfectly fine to use from several threads (only
the manual polling functionality is supposed to require special
precautions).
Since usbdk was the only real reason for using a single libusb context
and since usbdk (currently) has so many issues with Dolphin, I think
dropping support for it in order to fix other backends is acceptable.
|
|
Avoids dragging in IniFile, EXI device and SI device headers in this header which is
quite widely used throughout the codebase.
This also uncovered a few cases where indirect inclusions were being
relied upon, which this also fixes.
|
|
Detect when the setup function found no adapter, or found one but could
not connect to it, and report the new status in that case.
|
|
Update the GC adapter config GUI if the adapter is plugged or unplugged.
|
|
If opening the adapter fails, report the libusb error message in the GUI
instead of “No Adapter Detected”.
The error condition is removed when the adapter is unplugged.
|
|
The handle was previously kept open, which was causing future adapter
plug/unplug events to be ignored.
|
|
* Simplifies libusb context usage and allows us to set options for
all contexts easily. Notably, this lets us enable usbdk support
in libusb, which is now opt-in in the latest version.
* Moves the libusb config descriptor wrapper class to LibusbUtils too
since that could easily be reused.
* Moves device listing to LibusbUtils too and add a lock around it
as some libusb backends are not thread safe.
* Consequences: only a single context and a single event handling
thread is used now, which is more efficient.
|
|
|
|
Make CheckDeviceAccess() more flat by inverting checks, reducing
indentation and removing dead code.
|
|
|
|
|
|
|
|
|
|
This is only ever queried and not set outside of the Core.cpp, so this
should just be hidden internally and just have a function exposed that
allows querying it.
|
|
This reverts commit c8a6dc6c23a5efe99b4bf937003ba3f2f7f8f200.
libusb on Windows isn't really safe to use from different threads
with a single context.
|
|
Places all of the SI code under the SerialInterface namespace instead of
only the main source file. This keeps all SI code under a common name,
as well as out of the global namespace
|
|
Given this constant is related to the serial interface, it shouldn't be
outside of the namespace.
|
|
This prevents libusb warnings from showing up even when the user is
not using Bluetooth or USB passthrough, or the Wii U GC adapter.
|
|
IOS: USB support (OH0, USB_VEN, USB_HID)
|
|
|
|
libusb on Windows is limited to only a single context. Trying to open
more than one can cause device enumerations to fail randomly.
libusb is thread-safe and we don't use the manual polling support (with
`poll()`) so this should be safe.
|
|
|
|
|
|
Most of this commits changes performance decreasing logs from info to debug and also cleans up innacurate levels.
|
|
|
|
There's no reason this only should apply to netplay.
|
|
|
|
GCAdapter: improve thread safety
|
|
Reset() and Setup() are not used outside of this namespace
|
|
make sure Reset() can’t be run concurrently with AddGCAdapter() or
ResetRumble() (which is called on other threads) which can cause
crashes (issue #9462)
|
|
In order to avoid desyncs
|
|
where the payload size would end up being crazy values on the other
thread. Mirroring the similar commit made for the android side:
https://github.com/Sonicadvance1/dolphin/commit/2833685fbfd782b78bbf1813f30cbb0a4ecd801d
|
|
Previously we would iterate through every GC adapter plugged in to the PC and steal ownership of it.
This causes issues all over the place in the implementation if this happens.
Break on the first adapter we can get access to.
|
|
This cleans up a bunch of #ifdef checks in places.
|
|
|