Commit graph

67 commits

Author SHA1 Message Date
Lioncash
56054fe86d core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
2020-07-15 19:41:22 -04:00
David
fbc30df353 Merge pull request #4141 from Morph1984/SevenSixAxisSensor
hid: Stub a series of "SevenSixAxisSensor" service commands
2020-06-25 19:37:39 +10:00
Morph
3e0ff59a63 hid: Stub a series of "SevenSixAxisSensor" service commands
- Used by Captain Toad: Treasure Tracker Update 1.3.0

While we're at it, fix the input parameters for SetIsPalmaAllConnectable and SetPalmaBoostMode
2020-06-24 11:57:39 -04:00
Morph
eaa3067fa8 hid: Implement Get/ResetGyroscopeZeroDriftMode
- Used by Captain Toad Treasure Tracker
2020-06-21 16:25:41 -04:00
VolcaEM
998bfbb573 hid: Stub GetXpadIDs
Allows Minecraft: Nintendo Switch Edition (a.k.a. old Minecraft) to boot and go ingame
2020-06-01 19:38:44 +02:00
David Marcec
26bd4978a3 Stub SendKeyboardLockKeyEvent
Needed for Puchikon 4 SmileBASIC 1.0.0
2020-05-12 01:01:50 +10:00
M&M
381eed14f6 services: hid: Stub StopSevenSixAxisSensor.
- Used by The Legend of Zelda: Breath of the Wild v1.6.0
2020-04-25 15:38:56 -07:00
bunnei
c84586b412 services: hid: Stub InitializeSevenSixAxisSensor.
- Used by Super Smash Bros. Ultimate v7.0.0.
2020-03-27 10:48:01 -04:00
bunnei
8b35acbd29 core_timing: Use better reference tracking for EventType. (#3159)
* core_timing: Use better reference tracking for EventType.

- Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects.
- Removes need for unique names - we won't be using this for save states anyways.
2019-11-26 21:48:56 -05:00
bunnei
5cb0f276fe kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects.

- See https://github.com/citra-emu/citra/pull/4710 for details.
2019-11-24 20:15:51 -05:00
David
692023754d Merge pull request #2859 from Morph1984/hid
hid: Stub SetNpadJoyAssignmentModeSingle and GetNpadHandheldActivationMode
2019-11-06 12:48:07 +11:00
Morph
bebe0ff470 hid: Implement DeactivateNpad
Makes use of the already existing DeactivateController function.
2019-10-07 04:44:09 -07:00
Morph
33b8716668 hid: Stub SetNpadJoyAssignmentModeSingle and reorganize service commands 2019-10-07 04:43:34 -07:00
David Marcec
4b13f6cfcb Rebase 2019-09-22 16:41:34 +10:00
David Marcec
a43d56f18c Deglobalize System: Hid 2019-09-22 16:30:29 +10:00
Morph1984
d8368a564d Update hid.h 2019-09-04 02:42:42 -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
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
Zach Hilman
20c46b9242 vm_manager: Remove cheat-specific ranges from VMManager 2019-03-05 10:09:36 -05:00
Zach Hilman
b1fbf45e5e controllers/npad: Add accessor for current press state
Allows frontend/features to access pressed buttons conveniently as possible
2019-03-04 18:39:57 -05:00
Lioncash
269a497914 service/hid: Amend forward declaration of ServiceManager
The SM namespace is within the Service namespace, so this was forward
declaring a type that didn't exist.
2019-02-27 11:36:48 -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
543cea4c5d travis: Use correct package for linux Qt5WebEngine 2018-12-28 19:29:49 -05:00
Zach Hilman
e342002cd2 hid: Make Hid service accessible and add GetPressState 2018-12-28 15:32:03 -05:00
David Marcec
ac381f9ed6 "Better Hid" rework part 1 2018-10-10 13:15:35 +11: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
68b6099706 hid: Use HID_NUM_LAYOUTS constant for indicating size of the layouts array
Gets rid of the use of a magic constant
2018-07-19 15:07:36 -04:00
shinyquagsire23
a02f67160c hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTO 2018-06-11 19:41:29 -06:00
David Marcec
8ba0ecb303 Fix deadlocks caused from HID having too many layouts
Games such as SMO deadlock if we have more than 2 layouts
2018-05-23 16:00:25 -07:00
Max Thomas
a12f45de82 hid: Tweaks, Analog Sticks (#435)
* hid: Update mouse/keyboard state

* hid: Working analog sticks

* hid: Nits

* hid: Nits

* hid: Update mystery sections

* hid: Tweaks
2018-05-07 11:06:02 -04:00
Lioncash
6d94dd21a5 service: Use nested namespace specifiers where applicable
Tidies up namespace declarations
2018-04-19 22:20:28 -04:00
shinyquagsire23
63ab9293d4 hid: Adjust for style guide 2018-01-16 19:22:12 -07:00
shinyquagsire23
7d238badfb hid: Write to all layouts, implement circular buffers, set up controller metadata. 2018-01-16 03:14:27 -07:00
shinyquagsire23
2f5dbd0f43 hid: Bare-minimum sharedmem input 2018-01-15 02:30:58 -07:00
shinyquagsire23
5d387d9205 hid: Remove redundant HID prefix on structs/enums 2018-01-15 02:30:58 -07:00
shinyquagsire23
65b9660a84 hid: Add sharedmem structs 2018-01-15 02:30:53 -07:00
bunnei
951d762f1e hid: Implement IAppletResource::GetSharedMemoryHandle. 2018-01-14 21:45:06 -05:00
bunnei
5993f6f6de Remove lots more 3DS-specific code. 2017-10-12 21:21:49 -04:00
wwylele
b05c60172b HID: zero unused PadState bits 2017-08-10 17:01:03 +03:00
wwylele
fced3273c1 ir: implement new 3ds HID via ir:rst 2017-05-04 12:59:28 +03:00
wwylele
9bdb78f869 Input: remove unused stuff & clean up
1. removed zl, zr and c-stick from HID::PadState. They are handled by IR, not HID
2. removed button handling in EmuWindow
3. removed key_map
4. cleanup #include
2017-03-01 23:30:57 +02:00
wwylele
74b1bf38fe HID: use ButtonDevice 2017-03-01 23:30:57 +02:00
Weiyi Wang
924b953308 hid: remove the touch field from PadState (#2557) 2017-02-11 01:11:42 -08:00
wwylele
8f807fc8ef HID: manages updating itself using correct ticks 2017-01-16 09:51:44 +02:00
Emmanuel Gil Peyrot
1138ec0d49 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
wwylele
c1cd474866 Refactor input subsystem 2016-05-15 13:24:22 +03:00
wwylele
586f6b854c implement GyroscopeCalibrateParam 2016-03-25 12:22:02 +03:00
wwylele
9fe0c0b898 implement accel and gyro backend 2016-03-22 18:35:03 +02:00
James Rowe
1bc7829ee9 Move input values into an array 2015-07-27 21:41:21 -06:00