Ameer
f071a70fec
std::array and const reference passing of non-trivial objects
2020-06-22 18:11:59 -04:00
ameerj
14bb562028
Update src/input_common/main.cpp
...
Co-authored-by: LC <mathew1800@gmail.com>
update libusb submodule (hopefully windows build error fixed)
2020-06-22 17:05:50 -04:00
Ameer
5479427335
Tidy up the pointers, use pair over tuple where appropriate
2020-06-21 23:56:56 -04:00
Ameer
a0f8f1dc5e
fix for sleep using stl
2020-06-21 22:58:53 -04:00
Ameer
92a812d815
shared_ptr for the GC adapter class, constexpr constants
2020-06-21 21:50:58 -04:00
Ameer
4a54dc6bbf
std::arrays where appropriate, clear q in adapter class, other touch ups
2020-06-21 21:17:46 -04:00
Ameer
5ebed7b1bb
fix include thread
2020-06-21 21:17:46 -04:00
Ameer
eddf2d0f4e
Singleton GC Adapter class, remove globals, fix naming convention
...
Fix clang formatting
Manual fix for configure_input_player formatting
Add missing lib usb cmake command
2020-06-21 21:17:07 -04:00
Ameer
77ae7fe5dd
Clang Formatting
2020-06-21 15:31:57 -04:00
Ameer
243dbee81e
Cleanup after linter
2020-06-21 13:02:43 -04:00
Ameer
dbe1ad4fe4
GC Adapter Implementation
2020-06-21 12:36:28 -04:00
MerryMage
b26ff8fa86
input_common/motion_emu: Remove redundant move
...
Named return value optimization automatically applies here.
2020-06-19 14:29:59 +01:00
MerryMage
38f25284c8
input_common/keyboard: Remove redundant move
...
Named return value optimization automatically applies here.
2020-06-19 14:29:36 +01:00
FearlessTobi
358d645018
input_common: fix build when SDL2 is disabled
2020-05-02 21:47:17 +02:00
bunnei
7a4ed2581d
Merge pull request #3673 from lioncash/extra
...
CMakeLists: Specify -Wextra on linux builds
2020-04-16 21:12:33 -04:00
Markus Wick
ea1146eba0
input_common: Use the CMake target instead of the variable.
2020-04-16 16:42:59 +02:00
Lioncash
02e095313a
CMakeLists: Specify -Wextra on linux builds
...
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-04-15 21:33:46 -04:00
bunnei
1429f883b2
Merge pull request #3525 from FearlessTobi/linux-compile-error
...
input_common/udp: Fix Linux build by using a backwards compatible way of error checking
2020-03-21 16:04:45 -04:00
ReinUsesLisp
d8191c0d7f
input_common/udp: Fix clang build issues
2020-03-18 04:30:26 -03:00
FearlessTobi
a38b732a6c
input_common/udp: Fix Linux build by using a backwards compatible way of 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-17 12:29:25 +01:00
James Rowe
37cf312477
input/udp - Add minor error handling to prevent bad input from crashing
2020-03-03 23:46:05 -07:00
James Rowe
f40becae29
input/udp - Dont log on invalid packet received
2020-03-03 19:52:16 -07:00
CJBok
7ec4bd7793
analog_from_button get direction implementation
2020-02-18 06:45:37 +01:00
Lioncash
ba28438e61
input_common/udp: Ensure that UDP is shut down within Shutdown()
...
Previously the UDP backend would never actually get shut down.
2020-02-03 09:29:15 -05:00
Lioncash
f693c966a0
input_common/udp: Add missing override specifiers
...
Prevents trivial warnings and ensures interfaces are properly
maintained between the base class.
2020-02-03 09:26:53 -05:00
Lioncash
02fbec1123
input_common/udp: std::move SocketCallback instances where applicable
...
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-03 09:24:05 -05:00
Lioncash
cf11ee1b0d
input_common/udp: std::move shared_ptr within Client constructor
...
Gets rid of a trivially avoidable atomic reference count increment and
decrement.
2020-02-03 09:21:46 -05:00
Lioncash
8e230f3e37
udp/client: Replace deprecated from_string() call with make_address_v4()
...
Future-proofs code if boost is ever updated.
2020-02-03 09:20:40 -05:00
Lioncash
e397a2145c
input_common/udp: Silence -Wreorder warning for Socket
...
Amends the constructor initializer list to specify the order of its
elements in the same order that initialization would occur.
2020-02-03 09:15:32 -05:00
Lioncash
2ba97142ab
input_common/udp: Remove unnecessary inclusions
2020-02-03 09:13:40 -05:00
Lioncash
5da05e3128
input_common/udp: Add missing header guard
2020-02-03 09:09:06 -05:00
bunnei
0058ae07f7
Merge pull request #3284 from CJBok/hid-fix
...
hid: Fix analog sticks directional states
2020-02-01 14:02:41 -05:00
FearlessTobi
e89cbc93dd
Address second part of review comments
2020-01-23 20:55:26 +01:00
FearlessTobi
af272d88d9
Address review comments
2020-01-23 20:55:26 +01:00
fearlessTobi
b2f53cceb6
Input: UDP Client to provide motion and touch controls
...
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-23 20:55:26 +01:00
CJBok
be576083dd
Moved analog direction logic to sdl_impl
2020-01-15 11:25:15 +01:00
Lioncash
c10e37ddbf
input_common/sdl/sdl_impl: Correct logging string in SDLState constructor
...
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-03 16:56:47 -04:00
Lioncash
f7b6090635
input_common/sdl/sdl_impl: Move documentation comments to header where applicable
...
Places the documentation comments with the rest of SDLState's member
function documentation.
2019-06-03 16:56:47 -04:00
Lioncash
ac88c3d84d
input_common/sdl/sdl_impl: Amend names for axes for SDLAnalogPoller
...
Adds another underscore to clearly indicate the axis names.
2019-06-03 16:56:47 -04:00
Lioncash
4124d77186
input_common/sdl/sdl_impl: Mark variables const where applicable
...
Make it explicit that these aren't modified elsewhere (either through
functions by reference, or by other operations).
2019-06-03 16:56:47 -04:00
Lioncash
5b89bf78b8
input_common/sdl/sdl_impl: Mark SDLEventToButtonParamPackage() as static
...
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-03 16:56:47 -04:00
Lioncash
f0a45d70a8
input_common/sdl/sdl_impl: Convert reinterpret_cast into a static_cast
...
It's valid to static_cast a void pointer back into its proper type.
2019-06-03 16:56:46 -04:00
Lioncash
ed90a754c5
input_common/sdl/sdl_impl: Use insert_or_assign() where applicable
...
Same behavior, but without a potential need to unnecessarily default
construct a value.
2019-06-03 16:56:46 -04:00
Lioncash
f51bbb791d
input_common/sdl/sdl_impl: Simplify SDL_Joystick deleter handling
...
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-03 16:56:46 -04:00
Lioncash
14fb03b99b
input_common/sdl/sdl_impl: Resolve two sign conversion warnings
...
Silences the final two warnings in SDL code.
2019-06-03 16:56:46 -04:00
Lioncash
24f0967a65
input_common/sdl: Remove unused header includes and forward declarations
...
Gets rid of a few unnecessary inclusion dependencies. It also uncovered
a few indirect inclusion dependencies being relied upon.
2019-06-03 16:56:42 -04:00
Lioncash
5438937cee
input_common/sdl/sdl_impl: Use nested namespace specifiers where applicable
2019-06-03 15:49:04 -04:00
Lioncash
cbbf86ba97
input_common/sdl/sdl_impl: Silence sign conversion warnings
...
Makes the conversions explicit, as opposed to implicit.
2019-05-31 04:47:02 -03:00
Lioncash
eb88e9d088
general: Use deducation guides for std::lock_guard and std::unique_lock
...
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-04-01 12:53:47 -04:00
Lioncash
54150dcb73
input_common/sdl: Correct return values within implementations of GetPollers()
...
In both cases, we weren't actually returning anything, which is
undefined behavior.
2019-03-18 11:40:38 -04:00