Commit Graph

1849 Commits

Author SHA1 Message Date
yellows8
324a835b0c
hid: Various fixes. 2020-12-01 13:49:53 +01:00
yellows8
d28776e4d9
hid: Updated/added structs/enums. 2020-12-01 13:49:52 +01:00
yellows8
902af6cce0
hid: Updated structs. 2020-12-01 13:49:52 +01:00
fincs
967a5054a3
hid: Expose InitializeNpad/TouchScreen/Keyboard/Mouse
- Moved hidScanInput-specific initialization code to hidScanInput
- TouchScreen/Keyboard/Mouse are now activated during hidScanInput
  initialization (previously this was not done, which is technically UB)
- Removed hidDeactivateNpad (not called by retail software)
- Tweaks and adjustments to reduce code size when features are not used
2020-12-01 13:49:52 +01:00
yellows8
e4c701dc19
hid: Use _hidGetStates in hidGetSevenSixAxisSensorStates. 2020-12-01 13:49:52 +01:00
yellows8
d4c1d069f1
hid: Added hidGetKeyboardStates, which hidScanInput now uses.
Struct adjustments.
2020-12-01 13:49:52 +01:00
yellows8
52bf73e047
hid: Added hidGetMouseStates, which hidScanInput/etc now uses.
Struct adjustments.
2020-12-01 13:49:52 +01:00
yellows8
dc0bc2ab7b
hid: Fixed memset in hidJoystickRead(). 2020-12-01 13:49:51 +01:00
yellows8
1c82758c03
hid: Added hidGetTouchScreenStates, which hidScanInput now uses.
Struct adjustments.
2020-12-01 13:49:51 +01:00
fincs
2c26092608
hid: Implement hidSixAxisSensorValuesRead using hidGetSixAxisSensorStates + other minor adjustments 2020-12-01 13:49:51 +01:00
yellows8
e32acbeb9f
hid: Added hidGetSixAxisSensorStates.
Internal improvements, etc.
2020-12-01 13:49:51 +01:00
yellows8
16ff35faea
hid: Use structs for vibration/SixAxis handles.
Various internal improvements, andpass vibration handles by value where needed.
2020-12-01 13:49:51 +01:00
fincs
c0ef14fcaa
hid: Changed hidGetNpadStates* to return total_out directly instead of using an output var 2020-12-01 13:49:51 +01:00
fincs
0640c9da76
hid: Introduce HidNpadIdType, see details:
- Replaced most usages of HidControllerID with HidNpadIdType
- HidControllerID still exists for now, and the following functions
  keep accepting it for compatibility with most homebrew:
  - hidIsControllerConnected
  - hidKeysHeld/Down/Up
  - hidJoystickRead
  - hidSixAxisSensorValuesRead
- hidControllerIDTo/FromOfficial renamed to ToNpadIdType/FromNpadIdType
- Updated some comments that were left untouched during previous hid refactoring
- Partial internal refactor of hidGetNpadStates*
2020-12-01 13:49:50 +01:00
fincs
40e5b08f70
Split hidGetNpadControllerColor/PowerInfo into Single/Split variants 2020-12-01 13:49:50 +01:00
yellows8
3f4f6dba44
hid: Handle NULL with hidGetNpadStates*() total_out.
Use const for hidSetSupportedNpadIdType().
2020-12-01 13:49:50 +01:00
yellows8
82bc8bf648
hid: Updated docs. 2020-12-01 13:49:50 +01:00
yellows8
a924fac0ab
hid: Filled in the Gc trigger fields. 2020-12-01 13:49:50 +01:00
yellows8
5aaf6905dd
hid: Docs updated. 2020-12-01 13:49:50 +01:00
yellows8
9f13045546
hid: Added support for NpadGc.
Struct adjustments.
2020-12-01 13:49:49 +01:00
yellows8
7340772267
hid: Internal state reading improvements.
Struct adjustments.
2020-12-01 13:49:49 +01:00
yellows8
21647a76c8
hid: Added support for *Lark/Lucia.
Struct adjustments.
2020-12-01 13:49:49 +01:00
yellows8
ce20e14034
hid: Added hidGetNpadStatesPalma. 2020-12-01 13:49:49 +01:00
yellows8
46377bc180
hid: Added handling for NpadSystem(Ext).
Added hidGetNpadStatesSystemExt/hidGetNpadStatesSystem, and functionality for using these in hidScanInput().

Updated a struct.
2020-12-01 13:49:49 +01:00
yellows8
db39de34c5
hid: Replaced various funcs with versions which read from sharedmem.
* Various struct adjustments.
* Removed HidControllerLayoutType/hidSetControllerLayout/hidGetControllerLayout, since these are no longer used.
* Added HidNpadJoyAssignmentMode and hidGetNpadJoyAssignment.
* Replaced hidGetControllerFlags with hidGetNpadSystemProperties/hidGetNpadSystemButtonProperties.
* Added hidGetAppletFooterUiAttributesSet/hidGetAppletFooterUiTypes.
* hidScanInput() now uses hidGetNpadStates*() as determined by the output from hidGetNpadStyleSet().
2020-12-01 13:49:48 +01:00
yellows8
1e3145f81d
hid: Struct adjustments. 2020-12-01 13:49:48 +01:00
yellows8
54a296bc69
hid: Updated HidSharedMemory. 2020-12-01 13:49:48 +01:00
yellows8
c3a6d29cf4
hid: Added KEY_NES_HANDHELD_LEFT_B. 2020-12-01 13:49:48 +01:00
yellows8
991a262e19
hid: Replaced HidControllerType with HidNpadStyleTag.
HidNpadStyleTag now includes more controllers.

Replaced hidGetControllerType with hidGetNpadStyleSet().

Improved _hidGetDeviceHandles(), more controllers are now supported.
2020-12-01 13:49:48 +01:00
yellows8
e74c605a91
hid: Fixed HidNpadInterfaceType. 2020-12-01 13:49:48 +01:00
yellows8
ddc9538b69
hid: Updated/added structs and added hidGetNpadStates*(). 2020-12-01 13:49:47 +01:00
fincs
74b295827f
Add svcGetResourceLimitPeakValue [11.0.0+] 2020-12-01 13:49:15 +01:00
SciresM
8ce231e7c9
ldr: update SetProgramArguments for 11.0.0 abi change (#507) 2020-12-01 12:01:33 +01:00
Michael Scire
e5ae43f4c2 results: use R_VALUE for comparisons 2020-12-01 02:26:26 +01:00
Luis Scheurenbrand
c95b46c053 news: fix structs 2020-11-18 19:16:32 +01:00
averne
2fdae0db52
Add service wrappers for ins:r and ins:s (#502) 2020-11-08 00:28:20 +01:00
fincs
091f88915d
virtmemRemoveReservation: add forgotten mutex note to docs 2020-10-31 14:06:48 +01:00
fincs
22a3efcbe1
virtmem: Deprecate virtmemReserve/virtmemFree 2020-10-30 16:10:52 +01:00
fincs
8310f438ca
virtmem: Add memory reservation system
jit: Use virtmemFindCodeMemory on both codepaths; use virtmem reservations
in order to support the JitType_SetProcessMemoryPermission codepath
2020-10-30 16:07:38 +01:00
fincs
490d96e6eb
virtmem: Add virtmemFindCodeMemory to work around a quirk in 1.x kernel 2020-10-30 00:16:03 +01:00
fincs
eecf2a9d32
Add detectMesosphere() 2020-10-29 16:52:16 +01:00
fincs
970d982e57
Add diagAbortWithResult, see details:
- This is a (weak/overridable) function meant to be called when the
  program encounters an unrecoverable error, but it's not fatal enough
  to bring down the entire system with it.
- The default implementation uses svcBreak, passing the result code
  in the user buffer.
- Replaced all usages of fatalThrow with diagAbortWithResult throughout
  the entire library.
2020-10-29 13:40:35 +01:00
fincs
a05a44fca8
virtmem: Major rewrite to support ASLR, see details:
- Added virtmemLock/Unlock, needed for atomic find-and-map operations
- Added virtmemFindAslr, which looks for a random free area in AslrRegion
  - virtmemReserve still exists for legacy callers who rely on sequential
    allocation in order to avoid race conditions from concurrent uses
- Added virtmemFindStack, which searches within StackRegion instead
  - Removed virtmemReserveStack/FreeStack
- Changed shmem/thread/tmem/codememory-jit to use the new virtmem API
  - Legacy jit still uses virtmemReserve
2020-10-27 12:27:32 +01:00
fincs
e655b48c41
crt0: clean up/refactor; envSetup: properly detect NSO/NRO environment... 2020-10-27 12:27:32 +01:00
fincs
7c6d7849f5
Remove obsolete kernel detection code 2020-10-27 12:27:32 +01:00
fincs
8d51f7de1c
jit: Transfer the responsibility of detecting whether CodeMemory syscalls are available/usable to the homebrew environment 2020-10-27 12:27:31 +01:00
fincs
d0d64ce1ce
fatalThrow: use hosversion instead of kerneldetect (and remove old alias) 2020-10-27 12:27:31 +01:00
fincs
4c6abe1e41
svcBreak: fix prototype, add and use BreakReason enum 2020-10-27 12:27:31 +01:00
fincs
e0c1dfe2ce
Add light event synchronization primitive [4.0.0+] 2020-10-27 12:27:20 +01:00
Michael Scire
dee3a7a241 gpio: loosen sysver restriction on OpenSession 2020-10-26 11:55:03 +01:00
Michael Scire
0ff42ee69e gpio: implement majority of the service 2020-10-26 11:48:07 +01:00
yellows8
8718c145f6
lp2p: Updated docs. 2020-10-25 19:55:33 -04:00
yellows8
8a31abeea7
Added lp2p. 2020-10-25 14:00:44 -04:00
averne
022887ac2d Fix event handle retrieval in spl 2020-10-04 00:20:16 +02:00
Vicki Pfau
4afec4016d psm: Add more battery functions 2020-09-28 00:36:35 +02:00
yellows8
f01fb21da5
Added uart. 2020-09-12 18:53:30 -04:00
yellows8
ab59dfb5bb
btdrv: Updated docs for BtdrvBluetoothPropertyType_Unknown3. 2020-09-04 11:59:35 -04:00
yellows8
625616bd44
btm: Update the right struct, BtmDeviceInfoList. 2020-08-26 19:10:38 -04:00
yellows8
9febf780b1
btm: Updated BtmDevicePropertyList. 2020-08-26 19:03:55 -04:00
yellows8
cc2be8375a
btm: Updated BtmHostDeviceProperty. 2020-08-26 12:28:32 -04:00
yellows8
cccef0c525
audout: Properly pass the aruid in audoutOpenAudioOut, fixes #197. 2020-08-21 13:32:31 -04:00
yellows8
ac8ac4919e
set: Updated for [10.1.0+], added more cmds, use struct for nickname. 2020-08-20 23:20:10 -04:00
yellows8
797cdffb14 btdrv: Updated BtdrvBleScanResult. 2020-08-20 18:38:55 -04:00
yellows8
5820178f56 btdrv: Updated param order. 2020-08-20 18:38:55 -04:00
yellows8
89358ba98c btdrv: Use const for btdrvWriteHidData/btdrvSetHidReport. 2020-08-20 18:38:55 -04:00
yellows8
c669589a35 bluetooth: Updated params, improved docs, etc. 2020-08-20 18:38:55 -04:00
yellows8
8718ea3659 Added btdev. 2020-08-20 18:38:55 -04:00
yellows8
4fae8554f7 btdrv/btm: Updated/added various structs. 2020-08-20 18:38:55 -04:00
yellows8
4db3c621e8 set: Use BtdrvAddress. 2020-08-20 18:38:55 -04:00
yellows8
3b670bc652 btdrv: Added the remaining cmds, various fixes, and added a types .h. 2020-08-20 18:38:55 -04:00
yellows8
ab9ce7c330 btdrv: Added support for pre-4.0.0, etc. 2020-08-20 18:38:55 -04:00
yellows8
8789077bb8 btm: Added the aruid cmds. 2020-08-20 18:38:55 -04:00
yellows8
070e959609 btm: Added more cmds. 2020-08-20 18:38:55 -04:00
yellows8
abf3600724 Added btm, moved btmu structs into btm, and updated docs. 2020-08-20 18:38:55 -04:00
yellows8
5551fcfab6 btmu/btdrv: Use bool flag where needed and updated docs. 2020-08-20 18:38:55 -04:00
yellows8
1442280447 btmu: g_btdrvIBtmUserCore -> g_btmuIBtmUserCore 2020-08-20 18:38:55 -04:00
yellows8
e7fbdf9eb1 Added btmsys. 2020-08-20 18:38:55 -04:00
yellows8
6ad9bd15d5 btmu: Updated docs. 2020-08-20 18:38:55 -04:00
yellows8
4e0fcb105d btdrv/btmu: Updated structs. 2020-08-20 18:38:55 -04:00
yellows8
94464baf38 btdrv/btmu: Various improvements. 2020-08-20 18:38:55 -04:00
yellows8
9439243649 Added btmu and added btdrv structs. 2020-08-20 18:38:55 -04:00
yellows8
a771f06a0e btdrv: Fixed btdrvGetHidReport IPC, updated docs, and added an enum. 2020-08-20 18:38:55 -04:00
yellows8
354e7d84fd btdrv: Added btdrvTriggerConnection. 2020-08-20 18:38:55 -04:00
yellows8
bc16eb227b btdrv: Updated the BtdrvBleAdvertisePacketData struct. 2020-08-20 18:38:55 -04:00
yellows8
045f6477d9 btdrv: Added cmds:
btdrvSetBleVisibility, btdrvSetBleAdvertiseData, btdrvSetBleAdvertiseParameter, btdrvRegisterGattClient, btdrvUnregisterGattClient, btdrvUnregisterAllGattClients, btdrvGetGattAttribute, btdrvGetGattService, btdrvRegisterGattServer, btdrvUnregisterGattServer, btdrvConnectGattClient, btdrvDisconnectGattClient, btdrvAddGattService, btdrvEnableGattService, btdrvAddGattCharacteristic, btdrvAddGattDescriptor, btdrvGetBleManagedEventInfo, btdrvGetGattFirstCharacteristic, btdrvGetGattNextCharacteristic, btdrvGetGattFirstDescriptor, btdrvGetGattNextDescriptor, btdrvRegisterGattManagedDataPath, btdrvUnregisterGattManagedDataPath, btdrvRegisterGattHidDataPath, btdrvUnregisterGattHidDataPath, btdrvRegisterGattDataPath, btdrvUnregisterGattDataPath.
2020-08-20 18:38:55 -04:00
yellows8
e0ee2ffc86 btdrv: Added btdrvGetEventInfo/btdrvGetHidEventInfo, etc. 2020-08-20 18:38:55 -04:00
yellows8
0075672b93 btdrvGetLeEventInfo -> btdrvGetLeHidEventInfo 2020-08-20 18:38:55 -04:00
yellows8
b15a583b80 btdrv: Added more cmds and the required enum:
btdrvGetLatestPlr, btdrvEnableTxPowerBoostSetting, btdrvIsTxPowerBoostSettingEnabled, btdrvEnableAfhSetting, btdrvIsAfhSettingEnabled, btdrvGetChannelMap, btdrvMoveToSecondaryPiconet, btdrvIsManufacturingMode, btdrvEmulateBluetoothCrash, btdrvGetBleChannelMap.
2020-08-20 18:38:55 -04:00
yellows8
b18912980e btdrv: Added HidReportEventInfo support. 2020-08-20 18:38:55 -04:00
yellows8
2878b97f3a btdrv: Added cmds:
btdrvGetAdapterProperties, btdrvGetAdapterProperty, btdrvSetAdapterProperty, btdrvWriteHidData, btdrvWriteHidData2, btdrvSetHidReport, btdrvGetHidReport.

Added/updated the required enum/struct.

bt(drv): Updated docs.
2020-08-20 18:38:55 -04:00
yellows8
7e06e0e657 btdrv: Use InitializeBluetoothDriver during init. 2020-08-20 18:38:55 -04:00
yellows8
a5e8572019 Added initial bluetooth support. 2020-08-20 18:38:55 -04:00
yellows8
bcc0f86aa3
hidbus/ringcon: Fixed cleanup, this also fixed a crash. 2020-08-20 13:28:26 -04:00
HookedBehemoth
9a1e3aeb47
add news service wrapper (#493) 2020-08-04 19:37:34 +02:00
fincs
1b95c09a27
switch.ld: update init_array/fini_array handling for latest devkitA64 2020-07-25 18:26:33 +02:00
Adubbz
ed16b7f948 hiddbg: implement DeactivateHomeButton 2020-07-07 12:35:37 +02:00
SciresM
b8a095ac2f
fs: add missing AccessLog functions. (#491) 2020-07-03 00:03:36 +02:00
Michael Scire
e36c7a760f err: add ErrorContextType enum 2020-06-27 12:52:01 +02:00
yellows8
e2db987144
web: Added WebSession support. 2020-06-24 10:39:18 -04:00
yellows8
6620dfaa6f
applet: Added get-event funcs:
appletHolderGetExitEvent and expose appletHolderGetPopInteractiveOutDataEvent.
2020-06-24 10:35:30 -04:00
yellows8
a0ce273019
ssl: Improved docs. 2020-06-21 13:16:34 -04:00
Ezekiel Bethel
d0a7c6a2a5
fix return value of romfs_stat for non-existent files/directories (#488) 2020-06-18 10:58:12 +01:00
yellows8
044eac2f3d
web: Updated for 10.x. 2020-06-15 15:40:05 -04:00
yellows8
3d4f61735a
swkbd: Updated for 10.x and added:
swkbdInlineGetMaxHeight, swkbdInlineGetTouchRectangles, swkbdInlineIsUsedTouchPointByKeyboard.
2020-06-14 00:03:19 -04:00
yellows8
42568d6af8
swkbd: Adjusted the order in the .h. 2020-06-11 22:51:48 -04:00
yellows8
857e2f5c4d
swkbd: Added proper support for using SwkbdInlineMode_UserDisplay. 2020-06-11 22:40:14 -04:00
yellows8
29dd63e5db
Added support for nifmLa. Added nifmRequestGetAppletInfo. 2020-06-11 19:00:07 -04:00
yellows8
05badbdc29
miiLa: Minor docs adjustment. 2020-06-09 22:03:17 -04:00
yellows8
7940d8e9e1
Added support for the miiLa libapplet (MiiEdit). 2020-06-09 22:01:15 -04:00
yellows8
9dc185ba3c
Added support for libapplet nfpLa (amiibo). 2020-06-06 22:40:28 -04:00
HookedBehemoth
ac468913e4
add commands for accessing process storage (#485) 2020-06-06 15:13:23 +02:00
yellows8
eb9d377320
hid: Implemented the remaining functionality for supporting SevenSixAxisSensor, and added the required structs. Updated hidInitializeSevenSixAxisSensor for the [10.0.0+] change. 2020-06-01 12:11:24 -04:00
fincs
bce0ea871d
libnx v3.3.0 2020-05-27 16:52:38 +02:00
Dave Murphy
db795f42ad fix stat for romfs directories 2020-05-27 14:59:43 +02:00
Ezekiel Bethel
573e2f772c add lstat to fs_dev and romfs_dev 2020-05-26 17:32:54 +02:00
yellows8
17ebe4104a
ldn: Updated structs. 2020-05-24 12:34:43 -04:00
yellows8
ff931da962
ldn: Updated structs etc. 2020-05-19 17:30:50 -04:00
yellows8
6e92692043
ldn: Updated LdnNetworkInfo struct. 2020-05-18 22:46:53 -04:00
yellows8
07ba98b702
ldn: Filled in LdnAcceptPolicy, updated LdnNetworkInfo, and updated docs. 2020-05-18 16:02:41 -04:00
yellows8
2f25c57d0e
ldn: Updated structs. 2020-05-18 14:57:22 -04:00
yellows8
55c0205de0
ldn: Updated structs and docs. 2020-05-18 12:51:14 -04:00
yellows8
7bf43fefea
ldn: Updated structs/docs. 2020-05-17 19:54:25 -04:00
yellows8
02ed902558
Added support for ldn. 2020-05-17 15:49:23 -04:00
Michael Scire
3d726ed78c mutex: rewrite to optimize 2020-05-17 17:46:59 +02:00
yellows8
3c08ce6936
nifm: Added support for IRequest. 2020-05-12 23:32:20 -04:00
fincs
d1f4b11f9a
libnx v3.2.0 2020-05-11 20:28:37 +02:00
Michael Scire
4f401256b0 psc: correct version for pscPmModuleAcknowledge 2020-05-07 12:29:43 +02:00
yellows8
3971f3e053
ssl: Updated docs. 2020-05-05 21:51:40 -04:00
yellows8
de27e7b171
ssl: Improved docs. 2020-05-03 12:43:29 -04:00
Dave Murphy
c7130a785a fix string truncation warning 2020-05-03 00:58:03 +02:00
Dave Murphy
5b879cbb0e remove unreferenced struct 2020-05-03 00:58:03 +02:00
yellows8
2e41795194
ssl: Improved docs. 2020-05-02 12:02:22 -04:00
yellows8
bcdbd89292
ssl: Updated docs. 2020-05-01 22:49:51 -04:00
yellows8
8fcd1b2afa
ssl: Improved docs. 2020-04-30 12:26:43 -04:00
yellows8
ea77c1d4cb
ssl: Improved the SslVersion enum and updated the param type for sslCreateContext. 2020-04-29 12:26:44 -04:00
yellows8
3f5362a7bb
ssl: Updated docs. 2020-04-28 00:36:24 -04:00
fincs
b0494c1acb
Update outdated comments and naming in jit.h/c 2020-04-27 13:46:55 +02:00
Adubbz
dbc4b759e2 set: fix GetGyroscopeOffset 2020-04-26 16:52:28 +02:00
yellows8
3b2b3ebad4 socket-ssl: Updated docs. Check for output sockfd=-1 from the cmd with socketSslConnectionSetSocketDescriptor. 2020-04-24 16:39:22 -04:00
yellows8
41e90ef8b5 ssl: Updated params and docs + various improvements. Added sslConnectionGetServerCertDetail and the required structs. 2020-04-24 16:39:22 -04:00
yellows8
41aefdc5ee ssl/socket: Added socketSslConnectionSetSocketDescriptor/socketSslConnectionGetSocketDescriptor wrappers, and updated ssl for this. 2020-04-24 16:39:22 -04:00
yellows8
613fa855da ssl: Implemented the remaining ISslConnection cmds. Expose the total_out param for sslGetCertificates. Various improvements / updated docs. 2020-04-24 16:39:22 -04:00
yellows8
60e4ee04b0 Added initial support for the ssl service. 2020-04-24 16:39:22 -04:00
HookedBehemoth
8e245a0ba8
add capssc 1201-1203 debug calls (#408) 2020-04-24 22:10:42 +02:00
SciresM
8cbac97466
capssc: Add CaptureJpegScreenShot (#407) 2020-04-23 00:07:03 +02:00
yellows8
20fd5bb9a2
nacp: Updated the nacp struct, and added/updated structs for it. 2020-04-20 20:05:31 -04:00
yellows8
cc7fb493e1
hidsys: Added support for all of the [10.0.0+] ButtonConfig cmds, and the required enum/structs. 2020-04-20 18:46:42 -04:00
SciresM
06bebed819
caps: correct CapsScreenShotDecodeOption (#406) 2020-04-20 18:56:31 +02:00
Michael Scire
6fae441714 ns: fix appman getter funcs on 3.0.0-5.0.2 2020-04-20 12:36:50 +02:00
fincs
a1af4494bf
Add nvGpuChannelGetErrorInfo, see details:
- Rename NvError(Type) to NvNotification(Type)
- Introduce NvError struct (output of GetErrorInfo)
- Add nvioctlChannel_GetErrorInfo
2020-04-19 22:18:45 +02:00