Commit graph

57 commits

Author SHA1 Message Date
Narr the Reg
6aa6301acd input_common: Add joycon low level functions 2023-01-19 18:05:21 -06:00
Narr the Reg
d80e6c399b input_common: Initial skeleton for custom joycon driver 2023-01-19 18:05:20 -06:00
Liam
be43b62d79 cmake: make libusb optional 2022-12-28 17:26:46 -05:00
german77
243404bf34 input_common: Add virtual gamepad 2022-12-16 18:26:11 -06:00
liamwhite
a225ba4cda
Merge pull request #9391 from abouvier/cmake-sdl
cmake: use sdl2 imported target
2022-12-06 09:58:48 -05:00
Alexandre Bouvier
f385175aa2 cmake: prefer system libusb 2022-12-06 05:30:40 +01:00
Alexandre Bouvier
e6ae720c33 cmake: use sdl2 imported target 2022-12-06 01:26:30 +01:00
liamwhite
75e16547f8
Merge pull request #9300 from ameerj/pch
CMake: Use precompiled headers to improve compile times
2022-12-03 14:10:06 -05:00
ameerj
37bc5118ea CMake: Use precompiled headers 2022-11-29 18:50:49 -05:00
lat9nq
0941ae0b61 CMake: Directly link to SDL2-static when appropriate
Trying to be lazy and alias SDL2 to SDL2-static causes issues in later
versions of CMake. Just use the same condition to tell which one to use.
2022-11-28 23:21:14 -05:00
Morph
cae108404a CMakeLists: Remove redundant warnings
These warnings are already included in /W3.
2022-10-22 15:02:04 -04:00
Morph
f3c40f4a20 CMakeLists: Treat MSVC warnings as errors 2022-10-22 15:02:04 -04:00
Morph
e6ab1f673b general: Enforce C4800 everywhere except in video_core 2022-10-22 15:02:04 -04:00
Morph
93297d14d8 CMakeLists: Remove all redundant warnings
These are already explicitly or implicitly set in src/CMakeLists.txt
2022-10-22 15:02:04 -04:00
german77
e8d71712e7 input_common: Create virtual amiibo driver 2022-10-02 12:32:26 -05:00
Andrea Pappacoda
cdb240f3d4
chore: make yuzu REUSE compliant
[REUSE] is a specification that aims at making file copyright
information consistent, so that it can be both human and machine
readable. It basically requires that all files have a header containing
copyright and licensing information. When this isn't possible, like
when dealing with binary assets, generated files or embedded third-party
dependencies, it is permitted to insert copyright information in the
`.reuse/dep5` file.

Oh, and it also requires that all the licenses used in the project are
present in the `LICENSES` folder, that's why the diff is so huge.
This can be done automatically with `reuse download --all`.

The `reuse` tool also contains a handy subcommand that analyzes the
project and tells whether or not the project is (still) compliant,
`reuse lint`.

Following REUSE has a few advantages over the current approach:

- Copyright information is easy to access for users / downstream
- Files like `dist/license.md` do not need to exist anymore, as
  `.reuse/dep5` is used instead
- `reuse lint` makes it easy to ensure that copyright information of
  files like binary assets / images is always accurate and up to date

To add copyright information of files that didn't have it I looked up
who committed what and when, for each file. As yuzu contributors do not
have to sign a CLA or similar I couldn't assume that copyright ownership
was of the "yuzu Emulator Project", so I used the name and/or email of
the commit author instead.

[REUSE]: https://reuse.software

Follow-up to 01cf05bc75
2022-07-27 12:53:49 +02:00
german77
f19e7be6e8 input_common: Add camera driver 2022-07-23 19:38:42 -05:00
Morph
efc89c032b CMakeLists: Make variable shadowing a compile-time error
Now that the entire project is free of variable shadowing, we can enforce this as a compile time error to prevent any further introduction of this logic bug.
2022-06-13 18:19:23 -04:00
german77
6d108f0dcb input_common: Remove obsolete files 2021-11-24 20:30:23 -06:00
german77
59b995a9e5 input_common: Rewrite SDL 2021-11-24 20:30:23 -06:00
german77
10241886dd input_common: Rewrite udp client 2021-11-24 20:30:22 -06:00
german77
dc3ab9e110 input_common: Rewrite tas input 2021-11-24 20:30:22 -06:00
german77
395e9a449d input_common: Rewrite gc_adapter 2021-11-24 20:30:22 -06:00
german77
fa8e23b842 input_common: Rewrite touch 2021-11-24 20:30:22 -06:00
german77
00834b84dd input_common: Rewrite mouse 2021-11-24 20:30:22 -06:00
german77
5a785ed794 input_common: Rewrite keyboard 2021-11-24 20:30:22 -06:00
german77
4c6f2c2547 input_common: Move touch and analog from button. Move udp protocol 2021-11-24 20:30:22 -06:00
german77
854c933716 input_common: Create input poller and mapping 2021-11-24 20:30:22 -06:00
MonsterDruide1
b42c3ce21d input_common/tas: Base playback & recording system
The base playback system supports up to 8 controllers (specified by `PLAYER_NUMBER` in `tas_input.h`), which all change their inputs simulataneously when `TAS::UpdateThread` is called.

The recording system uses the controller debugger to read the state of the first controller and forwards that data to the TASing system for recording. Currently, this process sadly is not frame-perfect and pixel-accurate.

Co-authored-by: Naii-the-Baf <sfabian200@gmail.com>
Co-authored-by: Narr-the-Reg <juangerman-13@hotmail.com>
2021-09-18 23:22:00 +02:00
Morph
ebb82b0b83 CMakeLists: Treat -Wsign-compare as an error on GCC/Clang
Treats (un)signed comparison mismatches as errors to be consistent with MSVC
2021-07-06 12:50:09 -04:00
Morph
58550cfcdc input_common: Enforce C4242 2021-06-28 14:20:25 -04:00
lat9nq
ddc47e6df8 cmake: General improvements to libusb linking
Delegates libusb external communication to externals/CMakeLists.txt
Ensures an interface library `usb` for every pathway
input_common just links to the `usb` library now
externals/libusb/CMakeLists.txt sets variables to override SDL2's libusb
finding
Other minor cleanup
2021-06-03 03:49:35 -04:00
lat9nq
de69a5266f cmake: Use SDL 2.0.14 and fix CMake scope issue
Forces using SDL 2.0.14. Upgrades the SDL external to that version. Adds
a message when switching to the external.

Fixes an error where input_common only links to SDL when SDL2_FOUND is
set, but externals/CMakeLists cannot set that variable to the required
scope. Switch to using ENABLE_SDL2, which we can use since we now
include the SDL source.
2021-04-17 23:42:57 -04:00
bunnei
a4c6712a4b common: Move settings to common from core.
- Removes a dependency on core and input_common from common.
2021-04-14 16:24:03 -07:00
bunnei
7bc3e80399
Merge pull request #4939 from german77/MouseInput
InputCommon: Implement full mouse support
2020-11-29 22:59:50 -08:00
german
e46f0e084c Implement full mouse support 2020-11-25 23:59:30 -06:00
Jan Beich
e48e9a406c input_common: ignore some Clang warnings after 5c4774e8ce
error: unknown warning option '-Werror=unused-but-set-parameter'; did you mean '-Werror=unused-parameter'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Werror=unused-but-set-variable'; did you mean '-Werror=unused-const-variable'? [-Werror,-Wunknown-warning-option]
2020-11-25 23:57:11 +00:00
Lioncash
5c4774e8ce input_common: Treat warnings as errors
Migrates over warnings as errors for input common to match how the
common library treats warnings as errors.
2020-11-22 04:50:03 -05:00
Lioncash
046c0c91a3 input_common/CMakeLists: Make some warnings errors
Makes the input_common code warnings consistent with the rest of the
codebase.
2020-10-15 19:37:51 -04:00
german
2978232390 Add random motion input to keyboard 2020-09-25 17:59:52 -05:00
bunnei
f64917a852
Merge pull request #4570 from german77/motionInput
input_common: Add a basic class for motion devices
2020-09-02 11:09:18 -04:00
FearlessTobi
e6bd1fd1b8 yuzu: Add motion and touch configuration 2020-08-29 18:56:34 +02:00
german
2d207ec609 Implement a basic class for motion devices 2020-08-27 17:19:21 -05:00
Morph
f0fac0c7fb Project Mjölnir: Part 1
Co-authored-by: James Rowe <jroweboy@gmail.com>
Co-authored-by: Its-Rei <kupfel@gmail.com>
2020-08-26 02:32:32 -04:00
Jan Beich
883fab2fff input_common: make libusb private to gc_adapter 2020-07-13 18:48:19 +00:00
Jan Beich
48ff15602e cmake: pass libusb include directory as well
In file included from src/input_common/gcadapter/gc_adapter.cpp:8:
src/./input_common/gcadapter/gc_adapter.h:11:10: fatal error: 'libusb.h' file not found
 #include <libusb.h>
          ^~~~~~~~~~
2020-07-09 15:26:54 +00:00
Ameer
0248614add GC Adapter Implementation 2020-06-21 12:36:28 -04:00
Markus Wick
94c2c828a5 input_common: Use the CMake target instead of the variable. 2020-04-16 16:42:59 +02:00
fearlessTobi
ac3690f205 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
James Rowe
09ac66388c Input: Remove global variables from SDL Input
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-02 19:09:34 +01:00