summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2019-04-11service: Update service function tablesLioncash1-0/+15
Updates function tables based off information from SwitchBrew.
2019-03-24core/core_timing: Make callback parameters consistentLioncash1-5/+5
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-02-16core_timing: Convert core timing into a classLioncash1-7/+11
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-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash1-10/+9
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.
2018-12-29web_browser: Add bounds checking to applet interfaceZach Hilman1-120/+124
2018-12-28hid: Make Hid service accessible and add GetPressStateZach Hilman1-459/+416
2018-12-21hid: Fix SetNpadJoyHoldType and improve logging.bunnei1-44/+163
2018-11-29core: Port all current usages of Event to Readable/WritableEventZach Hilman1-1/+2
2018-11-26Changed logging to be "Log before execution", Added more error logging, all services should now log on some levelDavid Marcec1-40/+76
2018-11-19Changed polling rate of hid and Right joycon rotationDavid Marcec1-2/+2
2018-11-16Added SetIsPalmaAllConnectable, SetPalmaBoostModeDavid Marcec1-2/+14
Currently unclear what these do yet, will be researched at a later time when we want to implement palma.
2018-11-02Fixed HID crash when launching more than 1 game & signaled syleset change eventDavid Marcec1-0/+2
This should fix crashes when launching multiple games in yuzu
2018-10-21hid: Update service function table for hidbusLioncash1-0/+1
Updated based off information provided by Switchbrew.
2018-10-19hid: Update service function tablesLioncash1-6/+45
Updated based off information provided by Switchbrew.
2018-10-17Using dual joycons as the default controllerDavid Marcec1-3/+1
Reason for the change is to allow both docked and undocked mode to work
2018-10-12WipDavid Marcec1-1/+5
2018-10-11Dynamically decide handheld variant based on supported npad id priorityDavid Marcec1-0/+4
Kirby input still doesn't work, should fix a lot of other games
2018-10-10Added BeginPermitVibrationSession and EndPermitVibrationSessionDavid Marcec1-2/+18
Used by Mario Party
2018-10-10Added GetLedPattern and HandheldVariantDavid Marcec1-2/+9
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-10Added the ability to "disconnect" individual npadsDavid Marcec1-1/+4
Fixes arms
2018-10-10Addressed changes for better hidDavid Marcec1-37/+30
2018-10-10"Better Hid" rework part 1David Marcec1-244/+189
2018-09-19Fixed GetAccountId stub, Added error code for OpenDirectory and added ActivateNpadWithRevisionDavid Marcec1-1/+7
With these, `Nintendo Entertainment System - Nintendo Switch Online` loads
2018-09-18Added ActivateGestureDavid Marcec1-1/+7
2018-09-18Added StopSixAxisSensorDavid Marcec1-1/+7
2018-09-18Stubbed ActivateConsoleSixAxisSensor & StartConsoleSixAxisSensorDavid Marcec1-2/+14
2018-09-15Port #4182 from Citra: "Prefix all size_t with std::"fearlessTobi1-1/+1
2018-09-09hid: Implement ReloadInputDevicesfearlessTobi1-4/+4
2018-08-29kernel: Eliminate kernel global stateLioncash1-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.
2018-08-24hid: Move core include to cpp fileLioncash1-0/+1
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-12hid: disable clang-format around tablesLioncash1-4/+5
Prevents clang-format from butchering them.
2018-08-12hid: Stub DisconnectNpad()Lioncash1-1/+7
This is required by ARMS.
2018-08-08hid: fix IsSixAxisSensorAtRest() responsemailwl1-1/+1
2018-08-07services/hid: Add ActivateNpadWithRevision() to the hid function info arrayLioncash1-0/+1
Updated based off the information on Switch Brew.
2018-07-30Add some HID commands (#843)Hexagon121-2/+16
* Added some HID commands * Addressed comments
2018-07-26service/hid: Add the hidbus, hid:dbg, hid:sys, and hid:tmp servicesLioncash1-0/+220
2018-07-26service/hid: Add the xcd:sys serviceLioncash1-0/+2
2018-07-26service/hid: Add irs servicesLioncash1-0/+3
2018-07-24core_timing: Split off utility functions into core_timing_utilMerryMage1-0/+1
2018-07-19hid: Use a ranged-for loops in UpdatePadCallbackLioncash1-7/+3
Modernizes the loops themselves while also getting rid of a signed/unsigned comparison in a loop condition.
2018-07-18Fill in more fields in TouchScreenEntryTouchZach Hilman1-4/+9
2018-07-18Single touch supportZach Hilman1-4/+19
2018-07-15HID: Update controllers less oftenJames Rowe1-3/+3
2018-07-11hid: Fix timestamps and controller type.bunnei1-7/+5
- This fixes user input in SMO.
2018-07-03Rename logging macro back to LOG_*James Rowe1-25/+25
2018-06-14Narrow down filter of layout configsZach Hilman1-9/+5
2018-06-13Move loop condition to free functionZach Hilman1-4/+9
2018-06-13Avoid initializing single-joycon layouts with handheld controllerZach Hilman1-1/+4
2018-06-12hid: Update all layouts and only show handheld as connected, fixes libnx input for P1_AUTOshinyquagsire231-1/+2
2018-05-30add IPC CommandType & Some HID FunctionInfo (#487)greggameplayer1-0/+30
* add some CommandType * add some hid FunctionInfo * add some other HID FunctionInfo * delete non useful comments
2018-05-07hid: Tweaks, Analog Sticks (#435)Max Thomas1-56/+134
* hid: Update mouse/keyboard state * hid: Working analog sticks * hid: Nits * hid: Nits * hid: Update mystery sections * hid: Tweaks
2018-04-30core_timing: Namespace all functions and constants in core_timing's headerLioncash1-3/+3
All of these variables and functions are related to timings and should be within the namespace.
2018-04-24hid: Move logging macros over to new fmt-compatible onesLioncash1-25/+25
2018-04-20service: Use nested namespace specifiers where applicableLioncash1-4/+2
Tidies up namespace declarations
2018-04-13Stubbed out GetPlayerLedPatternHexagon121-1/+7
2018-04-10Updated hid with more service names.Hexagon121-0/+50
2018-04-01hid: Write empty touch screen state.bunnei1-5/+21
2018-03-31hid: Stub out GetSupportedNpadStyleSet.bunnei1-0/+8
2018-03-25hid: Stub out SetNpadJoyAssignmentModeDual.bunnei1-1/+7
2018-03-04CoreTiming: Unschedule the pending events when an Interface is destroyed.Subv1-0/+4
2018-02-16Service/hid: stub some functionsmailwl1-0/+43
2018-02-15hid: Stub GetVibrationDeviceInfo and SendVibrationValues.bunnei1-0/+15
2018-02-07Service: stub some functions in am, audio, time, vi servicesmailwl1-0/+22
2018-02-06Service/hid: stub SetNpadHandheldActivationModemailwl1-0/+7
2018-02-06hid: Stub ActivateTouchScreen and SetNpadJoyHoldType.bunnei1-2/+14
2018-02-05hid: Stub out several functions.bunnei1-1/+39
2018-02-04hid: Implement CreateActiveVibrationDeviceList.bunnei1-0/+25
2018-02-04logger: Use Service_HID category where applicable.bunnei1-2/+2
2018-01-25hle: Rename RequestBuilder to ResponseBuilder.bunnei1-2/+2
2018-01-25service: Fix all incorrect IPC response headers.bunnei1-11/+2
2018-01-23Services: Added a todo about returning interfaces as domain objects in lm, hid and time.Subv1-0/+3
2018-01-22HID: Don't create an unnecessary port in CreateAppletResource.Subv1-13/+13
2018-01-22Stub OpenAudioOut and fix a issue with HID IAppletResource being created more than oncegdkchan1-1/+6
2018-01-17hid: Adjust timing based on actual hardwareshinyquagsire231-3/+3
2018-01-17hid: clang-formatshinyquagsire231-3/+3
2018-01-17hid: Adjust for style guideshinyquagsire231-13/+13
2018-01-16hid: Write to all layouts, implement circular buffers, set up controller metadata.shinyquagsire231-38/+65
2018-01-15hid: Bare-minimum sharedmem inputshinyquagsire231-0/+86
2018-01-15hid: Remove unused registered_loggers.bunnei1-3/+0
2018-01-15hid: Implement IAppletResource::GetSharedMemoryHandle.bunnei1-3/+61
2017-10-13Remove lots more 3DS-specific code.bunnei1-422/+3
2017-09-30Fixed type conversion ambiguityHuw Pascoe1-1/+1
2017-08-24HID: use TouchDevice for touch padwwylele1-4/+8
2017-08-20HID: fix a comment and a warningwwylele1-2/+2
2017-08-11HID: use MotionDevice for Accelerometer and Gyroscopewwylele1-5/+27
2017-06-19ResultVal: Remove MoveFrom()Yuri Kunde Schlesner1-6/+6
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
2017-06-06Service: Remove unnecessary includes from service.hYuri Kunde Schlesner1-0/+2
This has a huge fallout in terms of needing to fix other files because all service implementations included that file.
2017-05-04ir: implement new 3ds HID via ir:rstwwylele1-8/+11
2017-03-01HID: use AnalogDevicewwylele1-2/+9
2017-03-01HID: use ButtonDevicewwylele1-1/+44
2017-02-17HID: move enable_accelerometer/gyroscope_count initialization into Init() (#2574)Weiyi Wang1-2/+5
Fixes #2556
2017-01-20HID: reset acceleroeter and gyroscope index in Initwwylele1-0/+2
2017-01-16CoreTiming: use named constant for ARM11 clock ratewwylele1-3/+3
2017-01-16HID: manages updating itself using correct tickswwylele1-55/+93
2016-12-23core: Move emu_window and key_map into coreMerryMage1-1/+1
* Removes circular dependences (common should not depend on core)
2016-12-15hid: Get rid of a double -> float truncation warningLioncash1-1/+2
float literals need to have the 'f' prefix.
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner1-1/+1
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot1-8/+4
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-19Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner1-5/+4
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot1-22/+25
2016-06-11hid: add missing headerwwylele1-0/+2
2016-05-15fixup! fixup! Refactor input systemwwylele1-1/+1
2016-05-15Refactor input subsystemwwylele1-32/+36
2016-05-13Kernel/SharedMemory: Properly implemented shared memory support.Subv1-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.
2016-03-26use reference instead of pointerwwylele1-9/+9
2016-03-25implement GyroscopeCalibrateParamwwylele1-8/+7
2016-03-22implement accel and gyro backendwwylele1-3/+90
2016-03-13hid: fix pad updatewwylele1-1/+1
2016-03-12svc: Make ResetType an enum classLioncash1-5/+5
2016-02-12BitField: Make trivially copyable and remove assignment operatorMerryMage1-1/+1
2016-02-02services: Get rid of unnecessary includesLioncash1-1/+0
2015-09-16general: Silence some warnings when using clangLioncash1-2/+2
2015-07-28Move input values into an arrayJames Rowe1-0/+10
2015-06-28CitraQt: Cleanup includes.Emmanuel Gil Peyrot1-0/+1
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot1-1/+1
2015-05-27hid: Get rid of undefined behaviorLioncash1-2/+2
Modifying a variable twice across a sequence point.
2015-05-23HID: Stub DisableAccelerometer and DisableGyroscopeLowpurpasmart961-0/+20
2015-05-11Kernel: Capture SharedMemory attributes at creation, not when mappingYuri Kunde Schlesner1-2/+4
2015-05-07Common: Remove common.hYuri Kunde Schlesner1-0/+2
2015-05-02Services: Initialize all state variables at bootup.bunnei1-8/+14
2015-04-03Services: Stubs and minor changespurpasmart961-3/+3
2015-03-17HID: Proper Signal Interrupts for EnableAccelerometer & EnableGyroscopeLow alongpurpasmart961-0/+32
with a stub for GetSoundVolume
2015-03-16arm_interface: Get rid of GetTicks.Lioncash1-3/+3
Removes a TODO.
2015-03-11HID: Removed unnecessary global variables.bunnei1-48/+42
2015-03-11HID: Added additional variable comments and some code cleanups.bunnei1-2/+6
2015-03-11HID: Complete refactor of pad/touch input to fix threading issues.bunnei1-81/+23
2015-03-10HID: Cleanup how `next_touch_index` is calculated for Pad and touch.bunnei1-2/+2
2015-03-10HID: Changed TouchDataEntry `valid` to a BitField and added some doc strings.bunnei1-1/+1
2015-03-10HID: Added functions to emulate the touchpad.bunnei1-0/+48
2015-03-10HID: Moved some docstrings to the header.bunnei1-23/+2
2015-03-10HID: Refactored shared memory decoding for touchpad support.bunnei1-21/+30
2015-03-04Services: Moved the PTM and APT services to their own folderSubv1-0/+32
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.
2015-02-02Kernel: Stop creating useless Handles during object creationYuri Kunde Schlesner1-6/+6
They're finally unnecessary, and will stop cluttering the application's handle table.
2015-02-02HID: Fix crash when pressing a key when the emulator is stoppedYuri Kunde Schlesner1-0/+2
2015-01-30Kernel: Convert Event to not use HandlesYuri Kunde Schlesner1-13/+15
2015-01-30Kernel: Convert SharedMemory to not use HandlesYuri Kunde Schlesner1-3/+3
2015-01-21Added HID_SPVR service and split HID_U implementation into service/hid/hid.xxxarchshift1-0/+138