summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/GCAdapter.cpp
AgeCommit message (Collapse)Author
2025-02-01LibusbDevice: Don't detach kernel drivers on macOSSanjay Govind
2025-01-24Fix segfault when passing invalid argumentsJoshua Vandaële
2024-12-01Android/GCAdapter: Don't join current threadJosJuice
The read thread could call Reset, which in turn tried to join the read thread, leading to a SIGABRT. This manifested as Dolphin consistently crashing when disconnecting a GC adapter and having a chance of crashing a few seconds after connecting a GC adapter.
2024-10-09Simplify `std::fill` with `std::array::fill`mitaclaw
2024-04-08Core::GetState: Avoid Global System Accessormitaclaw
2024-03-20GCAdapter: Adjust libusb transfer timeout to 100ms.Jordan Woyak
2024-01-04Core/SystemTimers: Refactor to class, move to System.Admiral H. Curtiss
2023-08-17Use structs for config callback IDsJosJuice
This way you can't mix up regular config callback IDs and CPU thread config callback IDs. (It would be rather bad if you did!)
2023-08-12GCAdapter: Fix Android unused constant warningDentomologist
CONTROLLER_OUTPUT_INIT_PAYLOAD_SIZE is only used by the libusb implementation.
2023-08-12GCAdapter: Fix spelling of constantsDentomologist
2023-07-05Switch libusb_config_descriptor to RAII typenyanpasu64
2023-07-05Workaround GC adapter detection breaking when reset failsnyanpasu64
2023-07-05Reset GC adapter upon IO error after sleep-wakenyanpasu64
Fixes GC adapter breaking on sleep-wake on Linux and burning a full CPU core. This is cleaner than alternative approaches.
2023-07-05Don't burn a CPU core and spam logs when GC Adapter failsnyanpasu64
2023-07-05Fix memory leak in libusb codenyanpasu64
2023-02-09Resolve various "no previous declaration" warningsPokechu22
2022-11-27CoreTiming: Refactor to class.Admiral H. Curtiss
2022-10-22GCAdapter: Process pad state in read thread and other general cleanups.Jordan Woyak
2022-06-08GCAdapter: Compare with LIBUSB_SUCCESS instead of 0Pokechu22
2022-06-08Log warnings when LibusbUtils::GetDeviceList failsPokechu22
2022-06-02GCAdapter: Use LibusbUtils::ErrorWrap in log messagesPokechu22
2022-06-02GCAdapter: Make local variables const where possiblePokechu22
2022-06-02GCAdapter: Merge Read logicPokechu22
2022-06-02GCAdapter: Have the read thread control the write threadPokechu22
This was done for Android in 6cc40b12357ae339abcb44517810af304bab77ea.
2022-06-02GCAdapter: Exit early if the adapter fails to open on AndroidPokechu22
This is only so that indentation is consistent with the non-android code.
2022-06-02GCAdapter: Remove check on write size on androidPokechu22
It was removed for non-android in 56239d1ae139998a7cde17ff02f0526ffb17f5ef, and android already uses a separate thread, so presumably this isn't needed anymore.
2022-06-02GCAdapter: Harmonize read/write thread variable namesPokechu22
2022-06-02GCAdapter: Remove unused includesPokechu22
2022-06-02GCAdapter: Use determinism hack on AndroidPokechu22
This hack was added in 8f0cbefbe57762de92284ef151e984f52ec8d7e6, and the part of it in SI_DeviceGCAdapter is present on Android already, so I don't see any reason why this part doesn't apply to Android.
2022-06-02GCAdapter: Convert ControllerType to an enum classPokechu22
2022-06-02GCAdapter: Fix rumble enabled config on AndroidPokechu22
I believe the setting already existed in the UI; it just wasn't implemented in GCAdapter_Android.cpp.
2022-06-02GCAdapter: Use std::array for controller read and write payloadsPokechu22
2022-06-02GCAdapter: Merge GCAdapter.cpp and GCAdapter_Android.cppPokechu22
This is mostly a brainless merge, #ifdef-ing anything that doesn't match between the two while preserving common logic. I didn't rename any variables (although similar ones do exist), but I did change one log that was ERROR on android and NOTICE elsewhere to just always be NOTICE. Further merging will follow.
2022-04-23Merge pull request #10540 from nyanpasu64/fix-gcadapter-atomicsJosJuice
Remove atomic usage and fix mutex locking in GCAdapter code
2022-04-22GCAdapter: don't call libusb_detach_kernel_driver on appleShawn Hoffman
2022-04-22GCAdapter: fix retval check of libusb_detach_kernel_driverShawn Hoffman
2022-04-22GCAdapter: move libusb context teardown lastShawn Hoffman
2022-04-22GCAdapter: some macro cleanupShawn Hoffman
2022-04-22GCAdapter: set read/write thread namesShawn Hoffman
2022-03-27Remove unnecessary atomic usage in GCAdapter.cppnyanpasu64
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.
2022-03-10GCAdapter: Defer initialization until MainWindow::InitControllersPokechu22
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.
2022-01-08Config: Port SI device settings to new config system.Admiral H. Curtiss
2022-01-05Config: Port GC Adapter settings to new config system.Admiral H. Curtiss
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
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.
2021-06-07Lint: End of namespaceSepalani
2021-05-05InputCommon: replace SerialInterface log with ControllerInterfaceFiloppi
where appropriate. SerialInterface was a leftover from the past, and makes no sense to be used on actual/real controllers.
2020-10-23InputCommon: Migrate logging over to fmtLioncash
Continues the migration of the logging calls over to the fmt capable ones.
2020-07-18Use range loop (if possible)Filip Gawin
2020-07-09InputCommon/GCAdapter: Unbreak Mayflash GCAdapters by allowing ↵Jordan Woyak
libusb_control_transfer call to fail.
2020-07-07InputCommon/GCAdapter: Fix offbrand "GCAdapters" with a ↵Jordan Woyak
libusb_control_transfer call.