summaryrefslogtreecommitdiff
path: root/src/input_common
AgeCommit message (Collapse)Author
2020-06-19input_common/motion_emu: Remove redundant moveMerryMage
Named return value optimization automatically applies here.
2020-06-19input_common/keyboard: Remove redundant moveMerryMage
Named return value optimization automatically applies here.
2020-05-02input_common: fix build when SDL2 is disabledFearlessTobi
2020-04-16Merge pull request #3673 from lioncash/extrabunnei
CMakeLists: Specify -Wextra on linux builds
2020-04-16input_common: Use the CMake target instead of the variable.Markus Wick
2020-04-15CMakeLists: Specify -Wextra on linux buildsLioncash
Allows reporting more cases where logic errors may exist, such as implicit fallthrough cases, etc. We currently ignore unused parameters, since we currently have many cases where this is intentional (virtual interfaces). While we're at it, we can also tidy up any existing code that causes warnings. This also uncovered a few bugs as well.
2020-03-21Merge pull request #3525 from FearlessTobi/linux-compile-errorbunnei
input_common/udp: Fix Linux build by using a backwards compatible way of error checking
2020-03-18input_common/udp: Fix clang build issuesReinUsesLisp
2020-03-17input_common/udp: Fix Linux build by using a backwards compatible way of ↵FearlessTobi
error checking Should fix https://github.com/yuzu-emu/yuzu/issues/3487. error_code::failed is a function which has been introduced in Boost 1.69. This version of boost hasn't landed in most major distros yet.
2020-03-03input/udp - Add minor error handling to prevent bad input from crashingJames Rowe
2020-03-03input/udp - Dont log on invalid packet receivedJames Rowe
2020-02-18analog_from_button get direction implementationCJBok
2020-02-03input_common/udp: Ensure that UDP is shut down within Shutdown()Lioncash
Previously the UDP backend would never actually get shut down.
2020-02-03input_common/udp: Add missing override specifiersLioncash
Prevents trivial warnings and ensures interfaces are properly maintained between the base class.
2020-02-03input_common/udp: std::move SocketCallback instances where applicableLioncash
std::function is allowed to heap allocate if the size of the captures associated with each lambda exceed a certain threshold. This prevents potentially unnecessary reallocations from occurring.
2020-02-03input_common/udp: std::move shared_ptr within Client constructorLioncash
Gets rid of a trivially avoidable atomic reference count increment and decrement.
2020-02-03udp/client: Replace deprecated from_string() call with make_address_v4()Lioncash
Future-proofs code if boost is ever updated.
2020-02-03input_common/udp: Silence -Wreorder warning for SocketLioncash
Amends the constructor initializer list to specify the order of its elements in the same order that initialization would occur.
2020-02-03input_common/udp: Remove unnecessary inclusionsLioncash
2020-02-03input_common/udp: Add missing header guardLioncash
2020-02-01Merge pull request #3284 from CJBok/hid-fixbunnei
hid: Fix analog sticks directional states
2020-01-23Address second part of review commentsFearlessTobi
2020-01-23Address review commentsFearlessTobi
2020-01-23Input: UDP Client to provide motion and touch controlsfearlessTobi
An implementation of the cemuhook motion/touch protocol, this adds the ability for users to connect several different devices to citra to send direct motion and touch data to citra. Co-Authored-By: jroweboy <jroweboy@gmail.com>
2020-01-15Moved analog direction logic to sdl_implCJBok
2019-06-03input_common/sdl/sdl_impl: Correct logging string in SDLState constructorLioncash
If this path was ever taken, a runtime exception would occur due to the lack of a formatting specifier to insert the error code into the format string.
2019-06-03input_common/sdl/sdl_impl: Move documentation comments to header where ↵Lioncash
applicable Places the documentation comments with the rest of SDLState's member function documentation.
2019-06-03input_common/sdl/sdl_impl: Amend names for axes for SDLAnalogPollerLioncash
Adds another underscore to clearly indicate the axis names.
2019-06-03input_common/sdl/sdl_impl: Mark variables const where applicableLioncash
Make it explicit that these aren't modified elsewhere (either through functions by reference, or by other operations).
2019-06-03input_common/sdl/sdl_impl: Mark SDLEventToButtonParamPackage() as staticLioncash
Its prototype declared at the top of the translation unit contains the static qualifier, so the function itself should also contain it to make it a proper internally linked function.
2019-06-03input_common/sdl/sdl_impl: Convert reinterpret_cast into a static_castLioncash
It's valid to static_cast a void pointer back into its proper type.
2019-06-03input_common/sdl/sdl_impl: Use insert_or_assign() where applicableLioncash
Same behavior, but without a potential need to unnecessarily default construct a value.
2019-06-03input_common/sdl/sdl_impl: Simplify SDL_Joystick deleter handlingLioncash
The deleter can just be set in the constructor and maintained throughout the lifetime of the object. If a contained pointer is null, then the deleter won't execute, so this is safe to do. We don't need to swap it out with a version of a deleter that does nothing.
2019-06-03input_common/sdl/sdl_impl: Resolve two sign conversion warningsLioncash
Silences the final two warnings in SDL code.
2019-06-03input_common/sdl: Remove unused header includes and forward declarationsLioncash
Gets rid of a few unnecessary inclusion dependencies. It also uncovered a few indirect inclusion dependencies being relied upon.
2019-06-03input_common/sdl/sdl_impl: Use nested namespace specifiers where applicableLioncash
2019-05-31input_common/sdl/sdl_impl: Silence sign conversion warningsLioncash
Makes the conversions explicit, as opposed to implicit.
2019-04-01general: Use deducation guides for std::lock_guard and std::unique_lockLioncash
Since C++17, the introduction of deduction guides for locking facilities means that we no longer need to hardcode the mutex type into the locks themselves, making it easier to switch mutex types, should it ever be necessary in the future.
2019-03-18input_common/sdl: Correct return values within implementations of GetPollers()Lioncash
In both cases, we weren't actually returning anything, which is undefined behavior.
2019-03-18input_common/sdl: Use a type alias to shorten declaration of GetPollersLioncash
Just makes the definitions a little bit more tidy.
2019-03-17input_common/sdl_impl: Make lambda capture more specific in SDLState constructorLioncash
We don't need to universally capture by reference. We specifically just need to capture the this pointer.
2019-03-17input_common/sdl_impl: Remove unnecessary std::chrono::duration constructionLioncash
Specifying the time unit itself is sufficient here.
2019-03-17input_common/sdl_impl: Remove unused variable in SDLState constructorLioncash
2019-03-02fixup! Joystick: Allow for background events; Add deadzone to SDLAnalogB3n30
2019-03-02input/sdl: lock map mutex after SDL callWeiyi Wang
Any SDL invocation can call the even callback on the same thread, which can call GetSDLJoystickBySDLID and eventually cause double lock on joystick_map_mutex. To avoid this, lock guard should be placed as closer as possible to the object accessing code, so that any SDL invocation is with the mutex unlocked
2019-03-02Input: Remove global variables from SDL InputJames Rowe
Changes the interface as well to remove any unique methods that frontends needed to call such as StartJoystickEventHandler by conditionally starting the polling thread only if the frontend hasn't started it already. Additionally, moves all global state into a single SDLState class in order to guarantee that the destructors are called in the proper order
2019-03-02Input: Copy current SDL.h/cpp files to implJames Rowe
This should make reviewing much easier as you can then see what changed happened between the old file and the new one
2019-02-27common/math_util: Move contents into the Common namespaceLioncash
These types are within the common library, so they should be within the Common namespace.
2019-02-26common/vector_math: Move Vec[x] types into the Common namespaceLioncash
These types are within the common library, so they should be using the Common namespace.
2019-02-26common/quaternion: Move Quaternion into the Common namespaceLioncash
Quaternion is within the common library, so it should be using the Common namespace.