summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Added auto controller switching to supported controllers and single joycon button rotationDavid Marcec2018-10-202-4/+189
| | | | 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
* Merge pull request #1526 from lioncash/svc-idbunnei2018-10-201-6/+45
|\ | | | | service: Update function tables
| * hid: Update service function tablesLioncash2018-10-191-6/+45
| | | | | | | | Updated based off information provided by Switchbrew.
* | hid/controller: Remove unused header inclusionsLioncash2018-10-189-9/+0
| | | | | | | | | | | | swap.h only needs to be present in the header for the type aliases and definitions, it's not actually needed in the cpp files though. input.h is just unused entirely in xpad.h
* | hid/controller/npad: Remove unused dump_idx member variableLioncash2018-10-181-1/+0
| | | | | | | | Given it's unused, we may as well toss it.
* | hid/controller/npad: Remove unnecessary semicolon from the closing brace of LedPattern's constructorLioncash2018-10-181-1/+1
| |
* | hid/controller/npad: Remove #pragma once from the cpp fileLioncash2018-10-181-2/+0
| | | | | | | | This is only useful in headers.
* | hid/controller/npad: Move npad_id_list into the cpp fileLioncash2018-10-182-2/+10
| | | | | | | | | | This is just a lookup table, and since it's private, there's nothing really stateful about it, so we can just move it into the cpp file.
* | hid/controller/npad: Remove unnecessary const from void return typeLioncash2018-10-182-2/+2
| | | | | | | | This literally does nothing.
* | hid/controller: Default the destructors of all controller types in the cpp fileLioncash2018-10-1816-0/+16
| | | | | | | | | | | | These classes are non-trivial and are definitely going to be changed in the future, so we default these to prevent issues with forward declarations, and to keep the compiler from inlining tear-down code.
* | controller_base: Default the base class constructor and destructor in the cpp fileLioncash2018-10-182-2/+4
|/ | | | The destructor doesn't need to be a pure-virtual function.
* Using dual joycons as the default controllerDavid Marcec2018-10-173-77/+59
| | | | Reason for the change is to allow both docked and undocked mode to work
* WipDavid Marcec2018-10-122-3/+23
|
* Dynamically decide handheld variant based on supported npad id priorityDavid Marcec2018-10-113-19/+62
| | | | Kirby input still doesn't work, should fix a lot of other games
* Added BeginPermitVibrationSession and EndPermitVibrationSessionDavid Marcec2018-10-103-2/+26
| | | | Used by Mario Party
* Added GetLedPattern and HandheldVariantDavid Marcec2018-10-103-6/+63
| | | | 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)
* Kirby expects handheld controllers to be at position 8David Marcec2018-10-101-2/+8
|
* Added the ability to "disconnect" individual npadsDavid Marcec2018-10-103-16/+40
| | | | Fixes arms
* Removed unneeded forward declarationsDavid Marcec2018-10-102-13/+2
|
* Addressed changes for better hidDavid Marcec2018-10-1019-167/+238
|
* "Better Hid" rework part 1David Marcec2018-10-1020-643/+1481
|
* Stubbed IRS (#1349)David2018-09-242-18/+167
| | | | | | | | | | * Stubbed IRS Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly. * Added IRS to logging backend * Forward declared shared memory for irs
* Fixed GetAccountId stub, Added error code for OpenDirectory and added ActivateNpadWithRevisionDavid Marcec2018-09-191-1/+7
| | | | With these, `Nintendo Entertainment System - Nintendo Switch Online` loads
* Added ActivateGestureDavid Marcec2018-09-181-1/+7
|
* Added StopSixAxisSensorDavid Marcec2018-09-181-1/+7
|
* Stubbed ActivateConsoleSixAxisSensor & StartConsoleSixAxisSensorDavid Marcec2018-09-181-2/+14
|
* Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi2018-09-151-1/+1
|
* hle/service: Default constructors and destructors in the cpp file where applicableLioncash2018-09-114-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a destructor isn't defaulted into a cpp file, it can cause the use of forward declarations to seemingly fail to compile for non-obvious reasons. It also allows inlining of the construction/destruction logic all over the place where a constructor or destructor is invoked, which can lead to code bloat. This isn't so much a worry here, given the services won't be created and destroyed frequently. The cause of the above mentioned non-obvious errors can be demonstrated as follows: ------- Demonstrative example, if you know how the described error happens, skip forwards ------- Assume we have the following in the header, which we'll call "thing.h": \#include <memory> // Forward declaration. For example purposes, assume the definition // of Object is in some header named "object.h" class Object; class Thing { public: // assume no constructors or destructors are specified here, // or the constructors/destructors are defined as: // // Thing() = default; // ~Thing() = default; // // ... Some interface member functions would be defined here private: std::shared_ptr<Object> obj; }; If this header is included in a cpp file, (which we'll call "main.cpp"), this will result in a compilation error, because even though no destructor is specified, the destructor will still need to be generated by the compiler because std::shared_ptr's destructor is *not* trivial (in other words, it does something other than nothing), as std::shared_ptr's destructor needs to do two things: 1. Decrement the shared reference count of the object being pointed to, and if the reference count decrements to zero, 2. Free the Object instance's memory (aka deallocate the memory it's pointing to). And so the compiler generates the code for the destructor doing this inside main.cpp. Now, keep in mind, the Object forward declaration is not a complete type. All it does is tell the compiler "a type named Object exists" and allows us to use the name in certain situations to avoid a header dependency. So the compiler needs to generate destruction code for Object, but the compiler doesn't know *how* to destruct it. A forward declaration doesn't tell the compiler anything about Object's constructor or destructor. So, the compiler will issue an error in this case because it's undefined behavior to try and deallocate (or construct) an incomplete type and std::shared_ptr and std::unique_ptr make sure this isn't the case internally. Now, if we had defaulted the destructor in "thing.cpp", where we also include "object.h", this would never be an issue, as the destructor would only have its code generated in one place, and it would be in a place where the full class definition of Object would be visible to the compiler. ---------------------- End example ---------------------------- Given these service classes are more than certainly going to change in the future, this defaults the constructors and destructors into the relevant cpp files to make the construction and destruction of all of the services consistent and unlikely to run into cases where forward declarations are indirectly causing compilation errors. It also has the plus of avoiding the need to rebuild several services if destruction logic changes, since it would only be necessary to recompile the single cpp file.
* hid: Implement ReloadInputDevicesfearlessTobi2018-09-091-4/+4
|
* kernel: Eliminate kernel global stateLioncash2018-08-291-3/+6
| | | | | | | | | | | | | | | | | | | | | | 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.
* hid: Move core include to cpp fileLioncash2018-08-242-1/+4
| | | | | 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.
* hid: disable clang-format around tablesLioncash2018-08-121-4/+5
| | | | Prevents clang-format from butchering them.
* hid: Stub DisconnectNpad()Lioncash2018-08-121-1/+7
| | | | This is required by ARMS.
* hid: fix IsSixAxisSensorAtRest() responsemailwl2018-08-081-1/+1
|
* services/hid: Add ActivateNpadWithRevision() to the hid function info arrayLioncash2018-08-071-0/+1
| | | | Updated based off the information on Switch Brew.
* Add some HID commands (#843)Hexagon122018-07-301-2/+16
| | | | | | * Added some HID commands * Addressed comments
* service/hid: Add the hidbus, hid:dbg, hid:sys, and hid:tmp servicesLioncash2018-07-261-0/+220
|
* service/hid: Add the xcd:sys serviceLioncash2018-07-263-0/+55
|
* service/hid: Add irs servicesLioncash2018-07-263-0/+73
|
* core_timing: Split off utility functions into core_timing_utilMerryMage2018-07-241-0/+1
|
* hid: Use a ranged-for loops in UpdatePadCallbackLioncash2018-07-191-7/+3
| | | | | Modernizes the loops themselves while also getting rid of a signed/unsigned comparison in a loop condition.
* hid: Use HID_NUM_LAYOUTS constant for indicating size of the layouts arrayLioncash2018-07-191-1/+1
| | | | Gets rid of the use of a magic constant
* Fill in more fields in TouchScreenEntryTouchZach Hilman2018-07-181-4/+9
|
* Single touch supportZach Hilman2018-07-181-4/+19
|
* HID: Update controllers less oftenJames Rowe2018-07-151-3/+3
|
* hid: Fix timestamps and controller type.bunnei2018-07-111-7/+5
| | | | - This fixes user input in SMO.
* Rename logging macro back to LOG_*James Rowe2018-07-031-25/+25
|
* Narrow down filter of layout configsZach Hilman2018-06-142-10/+5
|
* Move loop condition to free functionZach Hilman2018-06-131-4/+9
|
* Avoid initializing single-joycon layouts with handheld controllerZach Hilman2018-06-132-1/+5
|
* hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTOshinyquagsire232018-06-122-2/+3
|
* add IPC CommandType & Some HID FunctionInfo (#487)greggameplayer2018-05-301-0/+30
| | | | | | | | | | * add some CommandType * add some hid FunctionInfo * add some other HID FunctionInfo * delete non useful comments
* Fix deadlocks caused from HID having too many layoutsDavid Marcec2018-05-241-1/+1
| | | | Games such as SMO deadlock if we have more than 2 layouts
* hid: Tweaks, Analog Sticks (#435)Max Thomas2018-05-072-68/+220
| | | | | | | | | | | | | | * hid: Update mouse/keyboard state * hid: Working analog sticks * hid: Nits * hid: Nits * hid: Update mystery sections * hid: Tweaks
* core_timing: Namespace all functions and constants in core_timing's headerLioncash2018-04-301-3/+3
| | | | All of these variables and functions are related to timings and should be within the namespace.
* hid: Move logging macros over to new fmt-compatible onesLioncash2018-04-241-25/+25
|
* service: Use nested namespace specifiers where applicableLioncash2018-04-202-8/+4
| | | | Tidies up namespace declarations
* Stubbed out GetPlayerLedPatternHexagon122018-04-131-1/+7
|
* Updated hid with more service names.Hexagon122018-04-101-0/+50
|
* Merge pull request #297 from bunnei/hid-touch-statebunnei2018-04-021-5/+21
|\ | | | | hid: Write empty touch screen state.
| * hid: Write empty touch screen state.bunnei2018-04-011-5/+21
| |
* | hid: Stub out GetSupportedNpadStyleSet.bunnei2018-03-311-0/+8
|/
* hid: Stub out SetNpadJoyAssignmentModeDual.bunnei2018-03-251-1/+7
|
* CoreTiming: Unschedule the pending events when an Interface is destroyed.Subv2018-03-041-0/+4
|
* Service/hid: stub some functionsmailwl2018-02-161-0/+43
|
* hid: Stub GetVibrationDeviceInfo and SendVibrationValues.bunnei2018-02-151-0/+15
|
* Service: stub some functions in am, audio, time, vi servicesmailwl2018-02-071-0/+22
|
* Service/hid: stub SetNpadHandheldActivationModemailwl2018-02-061-0/+7
|
* hid: Stub ActivateTouchScreen and SetNpadJoyHoldType.bunnei2018-02-061-2/+14
|
* hid: Stub out several functions.bunnei2018-02-051-1/+39
|
* hid: Implement CreateActiveVibrationDeviceList.bunnei2018-02-041-0/+25
|
* logger: Use Service_HID category where applicable.bunnei2018-02-041-2/+2
|
* hle: Rename RequestBuilder to ResponseBuilder.bunnei2018-01-251-2/+2
|
* service: Fix all incorrect IPC response headers.bunnei2018-01-251-11/+2
|
* Services: Added a todo about returning interfaces as domain objects in lm, hid and time.Subv2018-01-231-0/+3
|
* HID: Don't create an unnecessary port in CreateAppletResource.Subv2018-01-221-13/+13
|
* Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than oncegdkchan2018-01-221-1/+6
|
* hid: Adjust timing based on actual hardwareshinyquagsire232018-01-171-3/+3
|
* hid: clang-formatshinyquagsire232018-01-171-3/+3
|
* hid: Adjust for style guideshinyquagsire232018-01-172-63/+68
|
* hid: Write to all layouts, implement circular buffers, set up controller metadata.shinyquagsire232018-01-162-39/+71
|
* hid: Bare-minimum sharedmem inputshinyquagsire232018-01-152-2/+88
|
* hid: Remove redundant HID prefix on structs/enumsshinyquagsire232018-01-151-73/+73
|
* hid: Add sharedmem structsshinyquagsire232018-01-151-0/+312
|
* hid: Remove unused registered_loggers.bunnei2018-01-151-3/+0
|
* hid: Implement IAppletResource::GetSharedMemoryHandle.bunnei2018-01-152-10/+67
|
* Remove lots more 3DS-specific code.bunnei2017-10-136-793/+6
|
* Fixed type conversion ambiguityHuw Pascoe2017-09-301-1/+1
|
* HID: use TouchDevice for touch padwwylele2017-08-241-4/+8
|
* HID: fix a comment and a warningwwylele2017-08-201-2/+2
|
* HID: use MotionDevice for Accelerometer and Gyroscopewwylele2017-08-111-5/+27
|
* HID: zero unused PadState bitswwylele2017-08-101-1/+1
|
* ResultVal: Remove MoveFrom()Yuri Kunde Schlesner2017-06-191-6/+6
| | | | | Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
* Service: Remove unnecessary includes from service.hYuri Kunde Schlesner2017-06-061-0/+2
| | | | | This has a huge fallout in terms of needing to fix other files because all service implementations included that file.
* ir: implement new 3ds HID via ir:rstwwylele2017-05-042-8/+21
|
* Input: remove unused stuff & clean upwwylele2017-03-011-34/+0
| | | | | | | 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
* HID: use AnalogDevicewwylele2017-03-011-2/+9
|
* HID: use ButtonDevicewwylele2017-03-012-1/+47
|
* HID: move enable_accelerometer/gyroscope_count initialization into Init() (#2574)Weiyi Wang2017-02-171-2/+5
| | | Fixes #2556
* hid: remove the touch field from PadState (#2557)Weiyi Wang2017-02-111-4/+0
|
* HID: reset acceleroeter and gyroscope index in Initwwylele2017-01-201-0/+2
|
* CoreTiming: use named constant for ARM11 clock ratewwylele2017-01-161-3/+3
|
* HID: manages updating itself using correct tickswwylele2017-01-162-58/+93
|
* core: Move emu_window and key_map into coreMerryMage2016-12-231-1/+1
| | | | * Removes circular dependences (common should not depend on core)
* hid: Get rid of a double -> float truncation warningLioncash2016-12-151-1/+2
| | | | float literals need to have the 'f' prefix.
* Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner2016-09-213-3/+3
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-212-9/+4
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-193-7/+6
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-184-75/+77
|
* hid: add missing headerwwylele2016-06-111-0/+2
|
* fixup! fixup! Refactor input systemwwylele2016-05-151-1/+1
|
* Refactor input subsystemwwylele2016-05-152-35/+36
|
* Kernel/SharedMemory: Properly implemented shared memory support.Subv2016-05-131-2/+3
| | | | | | | Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object. Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock. Removed the APT Shared Font hack as it is no longer needed.
* use reference instead of pointerwwylele2016-03-261-9/+9
|
* implement GyroscopeCalibrateParamwwylele2016-03-252-9/+20
|
* implement accel and gyro backendwwylele2016-03-224-23/+176
|
* hid: fix pad updatewwylele2016-03-131-1/+1
|
* svc: Make ResetType an enum classLioncash2016-03-121-5/+5
|
* BitField: Make trivially copyable and remove assignment operatorMerryMage2016-02-121-1/+1
|
* services: Get rid of unnecessary includesLioncash2016-02-023-3/+0
|
* services: Update some function tablesLioncash2015-12-301-0/+2
|
* general: Silence some warnings when using clangLioncash2015-09-161-2/+2
|
* Move input values into an arrayJames Rowe2015-07-282-1/+14
|
* CitraQt: Cleanup includes.Emmanuel Gil Peyrot2015-06-281-0/+1
|
* Common: Cleanup key_map includes.Emmanuel Gil Peyrot2015-06-281-7/+9
|
* Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot2015-05-293-3/+3
|
* hid: Get rid of undefined behaviorLioncash2015-05-271-2/+2
| | | | Modifying a variable twice across a sequence point.
* HID: Stub DisableAccelerometer and DisableGyroscopeLowpurpasmart962015-05-234-9/+47
|
* Kernel: Capture SharedMemory attributes at creation, not when mappingYuri Kunde Schlesner2015-05-111-2/+4
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-0/+2
|
* Services: Initialize all state variables at bootup.bunnei2015-05-021-8/+14
|
* Services: Stubs and minor changespurpasmart962015-04-032-6/+6
|
* Merge pull request #655 from purpasmart96/hid_fixesbunnei2015-03-174-12/+72
|\ | | | | HID: Proper Signal Interrupts for EnableAccelerometer & EnableGyroscopeLow along with a stub for GetSoundVolume
| * HID: Proper Signal Interrupts for EnableAccelerometer & EnableGyroscopeLow alongpurpasmart962015-03-174-12/+72
| | | | | | | | with a stub for GetSoundVolume
* | arm_interface: Get rid of GetTicks.Lioncash2015-03-161-3/+3
|/ | | | Removes a TODO.
* hid_user: Removed unnecessary includes.bunnei2015-03-111-2/+0
|
* HID: Removed unnecessary global variables.bunnei2015-03-112-58/+42
|
* HID: Added additional variable comments and some code cleanups.bunnei2015-03-112-20/+29
|
* HID: Complete refactor of pad/touch input to fix threading issues.bunnei2015-03-112-111/+28
|
* HID: Cleanup how `next_touch_index` is calculated for Pad and touch.bunnei2015-03-101-2/+2
|
* HID: Changed TouchDataEntry `valid` to a BitField and added some doc strings.bunnei2015-03-102-4/+4
|
* HID: Added static asserts to check register position in shared memory.bunnei2015-03-101-2/+16
|
* HID: Added functions to emulate the touchpad.bunnei2015-03-102-0/+61
|
* HID: Moved some docstrings to the header.bunnei2015-03-102-24/+16
|
* HID: Refactored shared memory decoding for touchpad support.bunnei2015-03-102-33/+64
|
* Services: Moved the PTM and APT services to their own folderSubv2015-03-046-81/+75
| | | | | | This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs. Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
* Frontends, HID: Add New 3DS specific pad buttons, and stub the touch one.Emmanuel Gil Peyrot2015-02-221-0/+19
|
* Asserts: break/crash program, fit to style guide; log.h->assert.harchshift2015-02-112-3/+0
| | | | | | | Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
* Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner2015-02-021-6/+6
| | | | | They're finally unnecessary, and will stop cluttering the application's handle table.
* HID: Fix crash when pressing a key when the emulator is stoppedYuri Kunde Schlesner2015-02-021-0/+2
|
* Service: Clean-up InterfaceYuri Kunde Schlesner2015-02-022-2/+2
|
* Kernel: Convert Event to not use HandlesYuri Kunde Schlesner2015-01-303-23/+27
|
* Kernel: Convert SharedMemory to not use HandlesYuri Kunde Schlesner2015-01-303-5/+11
|
* Added HID_SPVR service and split HID_U implementation into service/hid/hid.xxxarchshift2015-01-216-0/+414