Commit graph

68 commits

Author SHA1 Message Date
ReinUsesLisp
634c6e24b0 service/hid: Remove unused system reference 2019-10-04 23:41:21 +00:00
David Marcec
77fbf29047 Signal styleset changes at a better time
We should signal when a net controller is added and our event should be manual, not automatic.
2019-09-24 17:24:37 +10:00
David Marcec
59fd910355 removed comment 2019-09-22 23:42:52 +10:00
David Marcec
654427d4d0 Rebased 2019-09-22 23:42:41 +10:00
David Marcec
9513abbb0a removed unneeded semicolon 2019-09-22 18:50:34 +10:00
David Marcec
aed884d121 marked controller constructors as explicit 2019-09-22 16:41:38 +10:00
David Marcec
bd1c4ec9a0 Rebase 2019-09-22 16:41:34 +10:00
David Marcec
28181919a6 Deglobalize System: Hid 2019-09-22 16:30:29 +10:00
Morph1984
cd81194fc0
ditto
Co-Authored-By: David <25727384+ogniK5377@users.noreply.github.com>
2019-09-04 10:16:22 -04:00
Morph1984
ef98828d40
IsVibrationEnabled() as a const member func 2019-09-04 10:15:49 -04:00
Morph1984
ee35f7adf7
Update npad.h 2019-09-04 02:43:17 -04:00
Morph1984
5130b8a6a9
Update npad.cpp 2019-09-04 02:42:58 -04:00
David Marcec
5234e08a0d addressed issues 2019-07-08 14:51:40 +10:00
David Marcec
472210bf72 hid:StartLrAssignmentMode, hid:StopLrAssignmentMode, hid:SwapNpadAssignment
StartLrAssignmentMode and StopLrAssignmentMode don't require any implementation as it's just used for showing the screen of changing the controller orientation if the user wishes to do so.  Ever since #1634 this has not been needed as users can specify the controller orientation from the config and swap at any time. We store a private member just in case this gets used for anything extra in the future
2019-07-01 15:12:57 +10:00
Lioncash
a47aaa7f1b core/kernel/object: Rename ResetType enum members
Renames the members to more accurately indicate what they signify.
"OneShot" and "Sticky" are kind of ambiguous identifiers for the reset
types, and can be kind of misleading. Automatic and Manual communicate
the kind of reset type in a clearer manner. Either the event is
automatically reset, or it isn't and must be manually cleared.

The "OneShot" and "Sticky" terminology is just a hold-over from Citra
where the kernel had a third type of event reset type known as "Pulse".
Given the Switch kernel only has two forms of event reset types, we
don't need to keep the old terminology around anymore.
2019-05-18 15:52:51 -04:00
bunnei
3e930304fe
Merge pull request #2090 from FearlessTobi/port-4599
Port citra-emu/citra#4244 and citra-emu/citra#4599: Changes to BitField
2019-03-20 23:44:20 -04:00
Lioncash
bd983414f6 core_timing: Convert core timing into a class
Gets rid of the largest set of mutable global state within the core.
This also paves a way for eliminating usages of GetInstance() on the
System class as a follow-up.

Note that no behavioral changes have been made, and this simply extracts
the functionality into a class. This also has the benefit of making
dependencies on the core timing functionality explicit within the
relevant interfaces.
2019-02-15 21:50:25 -05:00
Lioncash
48d9d66dc5 core_timing: Rename CoreTiming namespace to Core::Timing
Places all of the timing-related functionality under the existing Core
namespace to keep things consistent, rather than having the timing
utilities sitting in its own completely separate namespace.
2019-02-12 12:42:17 -05:00
Weiyi Wang
89abef3518 remove all occurance of specifying endianness inside BitField
This commit it automatically generated by command in zsh:
sed -i -- 's/BitField<\(.*\)_le>/BitField<\1>/g' **/*(D.)

BitField is now aware to endianness and default to little endian. It expects a value representation type without storage specification for its template parameter.
2019-02-06 18:13:45 +01:00
Zach Hilman
cb930c4b5a web_browser: Add bounds checking to applet interface 2018-12-28 18:20:29 -05:00
Zach Hilman
621b25b6be hid: Make Hid service accessible and add GetPressState 2018-12-28 15:32:03 -05:00
bunnei
7e622c5575 npad: Remove code to invert input in horizontal mode.
- This was incorrect, the game appears to handle this for us.
- Fixes horizontal mode with Puyo Puyo Tetris and Super Mario Odyssey.
2018-12-26 15:47:11 -05:00
bunnei
ef69b4b830
Merge pull request #1803 from DarkLordZach/k-able-event
kernel: Divide Event into ReadableEvent and WritableEvent
2018-12-03 17:05:57 -05:00
David Marcec
a9223c8182 Fixed crash with SetNpadMode
fixed crash due to handheld
2018-12-03 02:45:08 +11:00
Zach Hilman
a342bcc9b1 kernel/event: Reference ReadableEvent from WritableEvent 2018-11-29 08:48:40 -05:00
Zach Hilman
ff610103b5 core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
bunnei
1e49a85106
Merge pull request #1801 from ogniK5377/log-before-execute
Changed logging to be "Log before execution", Added more error logging, all services/svc should now log on some level
2018-11-29 00:58:46 -05:00
bunnei
c5ab648554
Merge pull request #1817 from DarkLordZach/npad-idx-fix
npad: Use NPadIdToIndex to prevent invalid array access
2018-11-28 17:46:17 -05:00
Zach Hilman
299224790c npad: Use NPadIdToIndex to prevent invalid array access 2018-11-28 09:01:58 -05:00
Zach Hilman
6df74ff579 npad: Fix copy/paste error with LED position assignments 2018-11-27 17:23:44 -05:00
David Marcec
a2cc3b10bb Changed logging to be "Log before execution", Added more error logging, all services should now log on some level 2018-11-26 17:06:13 +11:00
Zach Hilman
b358e88512 debug_pad: Avoid loading input for nonexistent buttons (Home and Screenshot)
Prevents memory exceptions when the debug pad is enabled.
2018-11-22 12:23:43 -05:00
Zach Hilman
3a6cd5b3c8 hid: Use player-defined controller type as PREFERRED_CONTROLLER 2018-11-18 23:22:36 -05:00
Zach Hilman
55ded706d6 hid/npad: Update NPad to use player controller bindings and type 2018-11-18 23:22:36 -05:00
Zach Hilman
e9145c3e16 hid/touchscreen: Update Touchscreen to use advanced parameters
Including finger ID, diamater x/y, and angle. Additionally, checks if the touchscreen is enabled.
2018-11-18 23:22:36 -05:00
Zach Hilman
3b25426bd9 hid: Add controller bindings for Mouse controller 2018-11-18 23:22:36 -05:00
Zach Hilman
0fd45e78f4 hid: Add keyboard bindings for Keyboard controller 2018-11-18 23:22:36 -05:00
Zach Hilman
06cf050c0a hid: Add controller bindings for DebugPad controller
Used by developers to test games, not present on retail systems. Some games are known to respond to DebugPad input though, for example Kirby Star Allies.
2018-11-18 23:22:36 -05:00
David Marcec
0c3e7b7086 Added missing start/end touch attributes to touchscreen 2018-11-18 23:21:33 -05:00
David Marcec
f66c6fe554 Added debugpad skeleton 2018-11-18 23:21:33 -05:00
David Marcec
362b28d052 Added controller helper funcs 2018-11-18 23:21:33 -05:00
David Marcec
7fbe2c83a7 Left joycon rotation button remapping 2018-11-18 23:21:33 -05:00
David Marcec
b9c1e4b0e7 Added automatic npad switch based on supported stylesets 2018-11-18 23:21:33 -05:00
David Marcec
beab38601b Added multi-input support and controller assignment at any port 2018-11-18 23:21:33 -05:00
David
87eca5b209 Fixed priority switching edge case for handheld (#1675)
* Fixed priority switching edge case for handheld

We accidently used controller index instead of npad id

* Moved NPadIdToIndex
2018-11-15 20:31:27 -08:00
Lioncash
fcde356f15 hid/npad: Add missing break in switch statement within Controller_NPad::OnUpdate() 2018-11-14 00:59:17 -05:00
David Marcec
a9c25ab9e4 Updated npad styles on holdtype switches
Fixes input for megaman
2018-11-08 01:07:14 +11:00
David Marcec
0bc323bafb Fixed HID crash when launching more than 1 game & signaled syleset change event
This should fix crashes when launching multiple games in yuzu
2018-11-02 12:35:49 +11:00
Lioncash
93596d03ec
npad: Remove unused controller variable from OnInit()
This also gets rid of variable shadowing related to the lambda parameter
a little bit below this code as well.
2018-10-24 00:38:03 -04:00
David Marcec
a03600ba28 Added auto controller switching to supported controllers and single joycon button rotation
This is a subset of the better-hid-2 changes, this fixes input in various games which don't support dual joycons. This pr will search for the next best controller which is supported by the current game
2018-10-20 15:07:18 +11:00