Commit graph

148 commits

Author SHA1 Message Date
Morph
33b8716668 hid: Stub SetNpadJoyAssignmentModeSingle and reorganize service commands 2019-10-07 04:43:34 -07:00
ReinUsesLisp
271d159f41 service/hid: Silence -Wunused and -Wswitch 2019-10-04 23:41:22 +00:00
David Marcec
b0eaa9934b Rebased 2019-09-22 23:42:41 +10:00
David Marcec
4b13f6cfcb Rebase 2019-09-22 16:41:34 +10:00
David Marcec
9196c150d6 Deglobalize System: IRS 2019-09-22 16:30:30 +10:00
David Marcec
a43d56f18c Deglobalize System: Hid 2019-09-22 16:30:29 +10:00
Morph1984
32f74d8a88 clang-format 2019-09-04 10:06:38 -04:00
Morph1984
460e77c935 Update hid.cpp 2019-09-04 02:42:22 -04:00
David Marcec
f9eeba983f 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
14ead4ceb0 service: Update service function tables
Updates function tables based off information from SwitchBrew.
2019-04-11 02:47:00 -04:00
Lioncash
7739479e15 core/core_timing: Make callback parameters consistent
In some cases, our callbacks were using s64 as a parameter, and in other
cases, they were using an int, which is inconsistent.

To make all callbacks consistent, we can just use an s64 as the type for
late cycles, given it gets rid of the need to cast internally.

While we're at it, also resolve some signed/unsigned conversions that
were occurring related to the callback registration.
2019-03-24 18:12:17 -04:00
Lioncash
1c3371c921 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
1d2de5c4b5 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
Zach Hilman
f49f3e509f web_browser: Add bounds checking to applet interface 2018-12-28 18:20:29 -05:00
Zach Hilman
e342002cd2 hid: Make Hid service accessible and add GetPressState 2018-12-28 15:32:03 -05:00
bunnei
7f47320f34 hid: Fix SetNpadJoyHoldType and improve logging. 2018-12-21 13:37:39 -05:00
Zach Hilman
fe0071f8fa core: Port all current usages of Event to Readable/WritableEvent 2018-11-29 08:45:41 -05:00
David Marcec
5ae0d6cba2 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
David Marcec
2c23ad1189 Changed polling rate of hid and Right joycon rotation 2018-11-18 23:21:33 -05:00
David Marcec
6a1b7d2da0 Added SetIsPalmaAllConnectable, SetPalmaBoostMode
Currently unclear what these do yet, will be researched at a later time when we want to implement palma.
2018-11-17 01:40:18 +11:00
David Marcec
60bd67f92e 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
633b95adce hid: Update service function table for hidbus
Updated based off information provided by Switchbrew.
2018-10-21 16:51:46 -04:00
Lioncash
9abf6af0f1 hid: Update service function tables
Updated based off information provided by Switchbrew.
2018-10-19 03:59:15 -04:00
David Marcec
128f14d60e Using dual joycons as the default controller
Reason for the change is to allow both docked and undocked mode to work
2018-10-18 00:11:47 +11:00
David Marcec
578d5603bf Wip 2018-10-12 16:28:00 +11:00
David Marcec
efe038ca52 Dynamically decide handheld variant based on supported npad id priority
Kirby input still doesn't work, should fix a lot of other games
2018-10-12 02:56:49 +11:00
David Marcec
8a04b4850c Added BeginPermitVibrationSession and EndPermitVibrationSession
Used by Mario Party
2018-10-11 00:58:47 +11:00
David Marcec
1b5c6fb61c Added GetLedPattern and HandheldVariant
HandheldVariant is for specific games which expect handheld controllers to be at position 8(kirby), however this doesn't fix all games as some games require handhelds to be at position 0(snipperclips)
2018-10-10 21:38:43 +11:00
David Marcec
f3d245e919 Added the ability to "disconnect" individual npads
Fixes arms
2018-10-10 13:15:39 +11:00
David Marcec
1bc068dea2 Addressed changes for better hid 2018-10-10 13:15:37 +11:00
David Marcec
ac381f9ed6 "Better Hid" rework part 1 2018-10-10 13:15:35 +11:00
David Marcec
d24d803e6a Fixed GetAccountId stub, Added error code for OpenDirectory and added ActivateNpadWithRevision
With these, `Nintendo Entertainment System - Nintendo Switch Online` loads
2018-09-19 23:25:00 +10:00
David Marcec
6c9864da31 Added ActivateGesture 2018-09-19 01:13:58 +10:00
David Marcec
9498fea57d Added StopSixAxisSensor 2018-09-19 00:56:02 +10:00
David Marcec
53ca7a11cb Stubbed ActivateConsoleSixAxisSensor & StartConsoleSixAxisSensor 2018-09-19 00:52:20 +10:00
fearlessTobi
1190ea6ddb Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
fearlessTobi
f9ee07b1ef hid: Implement ReloadInputDevices 2018-09-09 00:57:41 +02:00
Lioncash
4913549d6b kernel: Eliminate kernel global state
As means to pave the way for getting rid of global state within core,
This eliminates kernel global state by removing all globals. Instead
this introduces a KernelCore class which acts as a kernel instance. This
instance lives in the System class, which keeps its lifetime contained
to the lifetime of the System class.

This also forces the kernel types to actually interact with the main
kernel instance itself instead of having transient kernel state placed
all over several translation units, keeping everything together. It also
has a nice consequence of making dependencies much more explicit.

This also makes our initialization a tad bit more correct. Previously we
were creating a kernel process before the actual kernel was initialized,
which doesn't really make much sense.

The KernelCore class itself follows the PImpl idiom, which allows
keeping all the implementation details sealed away from everything else,
which forces the use of the exposed API and allows us to avoid any
unnecessary inclusions within the main kernel header.
2018-08-28 22:31:51 -04:00
Lioncash
db36a14882 hid: Move core include to cpp file
This isn't required to be in the header. Instead, directly include what
this header needs and move it to the cpp file where it belongs.
2018-08-23 23:20:35 -04:00
Lioncash
ab4821d4b3 hid: disable clang-format around tables
Prevents clang-format from butchering them.
2018-08-12 05:57:33 -04:00
Lioncash
4ca059c59a hid: Stub DisconnectNpad()
This is required by ARMS.
2018-08-12 05:56:28 -04:00
mailwl
219c0dabe1 hid: fix IsSixAxisSensorAtRest() response 2018-08-08 09:36:23 +03:00
Lioncash
20f059acef services/hid: Add ActivateNpadWithRevision() to the hid function info array
Updated based off the information on Switch Brew.
2018-08-07 03:23:20 -04:00
Hexagon12
0c5691e8b4 Add some HID commands (#843)
* Added some HID commands

* Addressed comments
2018-07-30 10:06:21 -07:00
Lioncash
b3e0f46ee6 service/hid: Add the hidbus, hid:dbg, hid:sys, and hid:tmp services 2018-07-26 15:05:42 -04:00
Lioncash
3d37adc01f service/hid: Add the xcd:sys service 2018-07-26 15:05:42 -04:00
Lioncash
8724896db5 service/hid: Add irs services 2018-07-26 15:05:24 -04:00
MerryMage
672d7dd573 core_timing: Split off utility functions into core_timing_util 2018-07-24 11:03:24 +01:00
Lioncash
60eab9b720 hid: Use a ranged-for loops in UpdatePadCallback
Modernizes the loops themselves while also getting rid of a signed/unsigned
comparison in a loop condition.
2018-07-19 15:11:08 -04:00
Zach Hilman
03480ff436 Fill in more fields in TouchScreenEntryTouch 2018-07-18 16:33:11 -04:00