Commit graph

24 commits

Author SHA1 Message Date
Tobias
ab39d25ff0 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
2018-09-10 21:29:59 -04:00
Lioncash
fc2d6869bf input_common: Use std::move where applicable
Avoids unnecessary atomic reference count increments and decrements
2018-08-02 21:51:11 -04:00
Lioncash
d682d53bb2 input_common: Add missing override specifiers 2018-08-02 21:44:25 -04:00
James Rowe
e159c550d8 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
Lioncash
db4f7293fd input_common: Move old logging macros over to fmt-capable ones 2018-04-26 19:09:25 -04:00
Lioncash
043546e4db math_util: Remove the Clamp() function
C++17 adds clamp() to the standard library, so we can remove ours in
favor of it.
2018-04-20 10:14:13 -04:00
James Rowe
ea88c44eb8 Format: Run the new clang format on everything 2018-01-20 16:45:11 -07:00
bunnei
4ddfb2e881 Merge pull request #84 from lioncash/cmake
CMakeLists: Derive the source directory grouping from targets themselves
2018-01-18 01:37:17 -05:00
Lioncash
447c25646e 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.
2018-01-17 21:51:43 -05:00
Lioncash
651b5153dc input_common/sdl: Silence a -Wpessimizing-move warning 2018-01-17 18:44:16 -05:00
muemart
a884f3d03e Adding meumart's Citra SDL Joystick support. Citra PR #3116 2018-01-15 20:02:30 -05:00
wwylele
56684ad10b motion_emu: fix initialization order 2017-08-22 11:43:44 +03:00
James Rowe
df206639cf Merge pull request #2861 from wwylele/motion-refactor
Refactor MotionEmu into a InputDevice
2017-08-19 23:43:01 -06:00
wwylele
6e56beafbf motion_emu: no need to include thread in header 2017-08-19 07:21:02 +03:00
Dave Leaver
4c281049aa Fix Spelling/English mistakes 2017-08-14 09:15:39 +12:00
wwylele
d500f79b8e move MotionEmu from core/frontend to input_common as a InputDevice 2017-08-11 11:05:08 +03:00
danzel
6610e914a3 Fix some spelling mistakes 2017-08-11 19:51:16 +12:00
Yuri Kunde Schlesner
d84915c4a1 CMake: Define an interface target for SDL2 definitions 2017-05-27 21:38:49 -07:00
Yuri Kunde Schlesner
b78ce2bce5 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.
2017-05-27 18:41:24 -07:00
wwylele
96a97f2f6d input_common/sdl: add support for binding button to axis 2017-04-17 14:14:35 +03:00
wwylele
edc6c110bf citra-qt: release all buttons when render window focus is lost
credit to @Hawkheart for the original idea
2017-03-17 21:41:25 +02:00
wwylele
9cd5268ac3 InputCommon: add SDL joystick support 2017-03-01 23:30:57 +02:00
wwylele
ffb582ff3b InputCommon: add AnalogFromButton 2017-03-01 23:30:57 +02:00
wwylele
189063ac2d InputCommon: add Keyboard 2017-03-01 23:30:57 +02:00