Commit Graph

24 Commits (6d2761499464324c09a7b2c4c330a2409694d004)

Author SHA1 Message Date
Tobias 804115b2a4 Port #4141 from citra: Joystick hotplug support (#1275)
* Joystick hotplug support (#4141)

* use SDL_PollEvent instead of SDL_JoystickUpdate

Register hot plugged controller by GUID if they were configured in a previous session

* Move SDL_PollEvent into its own thread

* Don't store SDLJoystick pointer in Input Device; Get pointer on each GetStatus call

* Fix that joystick_list gets cleared after SDL_Quit

* Add VirtualJoystick for InputDevices thats never nullptr

* fixup! Add VirtualJoystick for InputDevices thats never nullptr

* fixup! fixup! Add VirtualJoystick for InputDevices thats never nullptr

* Remove SDL_GameController, make SDL_Joystick* unique_ptr

* fixup! Remove SDL_GameController, make SDL_Joystick* unique_ptr

* Adressed feedback; fixed handling of same guid reconnects

* fixup! Adressed feedback; fixed handling of same guid reconnects

* merge the two joystick_lists into one

* make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! make SDLJoystick a member of VirtualJoystick

* fixup! fixup! make SDLJoystick a member of VirtualJoystick

* SDLJoystick: Addressed review comments

* Address one missed review comment
6 years ago
Lioncash 684fc2c320 input_common: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements
7 years ago
Lioncash 29b6afb82f input_common: Add missing override specifiers 7 years ago
James Rowe 638956aa81 Rename logging macro back to LOG_* 7 years ago
Lioncash 376f6397c6
input_common: Move old logging macros over to fmt-capable ones 7 years ago
Lioncash fae2dd0344
math_util: Remove the Clamp() function
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
7 years ago
James Rowe 096be16636 Format: Run the new clang format on everything 7 years ago
bunnei be0e14ab3e
Merge pull request #84 from lioncash/cmake
CMakeLists: Derive the source directory grouping from targets themselves
7 years ago
Lioncash e710a1b989 CMakeLists: Derive the source directory grouping from targets themselves
Removes the need to store to separate SRC and HEADER variables, and then
construct the target in most cases.
7 years ago
Lioncash ed296e47f1 input_common/sdl: Silence a -Wpessimizing-move warning 7 years ago
muemart eaff98dbb3 Adding meumart's Citra SDL Joystick support. Citra PR #3116 7 years ago
wwylele 4d058cfb76 motion_emu: fix initialization order 7 years ago
James Rowe bbfa9d0635 Merge pull request #2861 from wwylele/motion-refactor
Refactor MotionEmu into a InputDevice
8 years ago
wwylele 223bd35450 motion_emu: no need to include thread in header 8 years ago
Dave Leaver bf71fc0342 Fix Spelling/English mistakes 8 years ago
wwylele 188194908c move MotionEmu from core/frontend to input_common as a InputDevice 8 years ago
danzel 8d3f48d0a3 Fix some spelling mistakes 8 years ago
Yuri Kunde Schlesner 776cb91785 CMake: Define an interface target for SDL2 definitions 8 years ago
Yuri Kunde Schlesner 7b81903756 CMake: Correct inter-module dependencies and library visibility
Modules didn't correctly define their dependencies before, which relied
on the frontends implicitly including every module for linking to
succeed.

Also changed every target_link_libraries call to specify visibility of
dependencies to avoid leaking definitions to dependents when not
necessary.
8 years ago
wwylele 4ad82f2e5a input_common/sdl: add support for binding button to axis 8 years ago
wwylele 5245c86f26 citra-qt: release all buttons when render window focus is lost
credit to @Hawkheart for the original idea
8 years ago
wwylele 51b1c1f211 InputCommon: add SDL joystick support 8 years ago
wwylele a6bd7917cb InputCommon: add AnalogFromButton 8 years ago
wwylele 38e800f70d InputCommon: add Keyboard 8 years ago