Libnx Switch: Difference between revisions
From GameBrew
More actions
No edit summary |
No edit summary |
||
| (8 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
{{Infobox Switch Homebrews | {{Infobox Switch Homebrews | ||
|title=Libnx | |title=Libnx | ||
|image= | |image=libnx.png | ||
|description=Library for Switch Homebrew. | |description=Library for Switch Homebrew. | ||
|author=switchbrew | |author=switchbrew | ||
|lastupdated= | |lastupdated=2026/02/04 | ||
|type=Developments | |type=Developments | ||
|version=4. | |version=4.11.1 | ||
|license=ISC | |license=ISC | ||
|download=https:// | |download=https://github.com/switchbrew/libnx/releases | ||
|website=https://switchbrew.github.io/libnx/ | |website=https://switchbrew.github.io/libnx/ | ||
|source=https://github.com/switchbrew/libnx | |source=https://github.com/switchbrew/libnx | ||
|donation= | |donation= | ||
}} | }} | ||
<!--https://dlhb.gamebrew.org/switchhomebrews/libnx.7z--> | |||
Nintendo Switch AArch64-only userland library. It is an adaptation of libctru. | |||
See [https://switchbrew.org/wiki/Setting_up_Development_Environment Switchbrew] for install instructions. | |||
== | ==Features== | ||
*Based on libctru. | |||
*Nintendo Switch AArch64-only. | |||
*Userland library. | |||
*Library for Switch Homebrew. | |||
==Changelog== | ==Changelog== | ||
'''v4.11.1''' | |||
* Change DebugEvent struct name by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/707 #707] | |||
* Add comments to PsmBatteryChargeInfoFields by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/706 #706] | |||
'''v4.11.0''' | |||
* Add nsGetApplicationControlData2 by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/699 #699] | |||
* correct internal consoleCls & consoleClearLine calls by [https://github.com/HookedBehemoth @HookedBehemoth] in [https://github.com/switchbrew/libnx/pull/698 #698] | |||
* usb: include additional definitions from libusb by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/704 #704] | |||
* psm: add missing functions by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/703 #703] | |||
* Add DebugEvent structure for svcGetDebugEvent by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/702 #702] | |||
* update for dka64 r29.1 by [https://github.com/WinterMute @WinterMute] in [https://github.com/switchbrew/libnx/pull/705 #705] | |||
'''v4.10.0''' | |||
* btdrv: label proto_mode field in data_report event info by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/673 #673] | |||
* nfp: Improve types and enums by [https://github.com/XorTroll @XorTroll] in [https://github.com/switchbrew/libnx/pull/675 #675] | |||
* btdrv: fix struct alignment issue in BtdrvBleEventInfo by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/680 #680] | |||
* remove unused version number in Makefile by [https://github.com/WinterMute @WinterMute] in [https://github.com/switchbrew/libnx/pull/679 #679] | |||
* add usbDsGetSpeed and missing speed enum entries. by [https://github.com/ITotalJustice @ITotalJustice] in [https://github.com/switchbrew/libnx/pull/676 #676] | |||
* Update SetSysEdid to include different types of Extension blocks by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/677 #677] | |||
* Cover new Chinese and Brazilian Portuguese language IDs for nacpGetLanguageEntry by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/684 #684] | |||
* btdrv: fix incorrectly labelled LE connection parameters by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/686 #686] | |||
* fix audout events being missed. by [https://github.com/ITotalJustice @ITotalJustice] in [https://github.com/switchbrew/libnx/pull/683 #683] | |||
* add audout:a audout:d aud:a aud:d by [https://github.com/ITotalJustice @ITotalJustice] in [https://github.com/switchbrew/libnx/pull/636 #636] | |||
* refactor console code for better ansi escape-code handling by [https://github.com/WinterMute @WinterMute] in [https://github.com/switchbrew/libnx/pull/682 #682] | |||
* fix missing include in switch.h for aud.h by [https://github.com/ITotalJustice @ITotalJustice] in [https://github.com/switchbrew/libnx/pull/687 #687] | |||
* Update TickCountInfo and IdleTickCount notes by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/696 #696] | |||
* Basic support for 21.0.0 by [https://github.com/SciresM @SciresM] in [https://github.com/switchbrew/libnx/pull/697 #697] | |||
* Fix svcSetHeapSize note by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/694 #694] | |||
* vi: swap close layer commands by [https://github.com/SamoZ256 @SamoZ256] in [https://github.com/switchbrew/libnx/pull/688 #688] | |||
* audren: expose frame event. by [https://github.com/ITotalJustice @ITotalJustice] in [https://github.com/switchbrew/libnx/pull/689 #689] | |||
'''v4.9.0''' | |||
* Fixes for GCC 15 by [https://github.com/SciresM @SciresM] in [https://github.com/switchbrew/libnx/pull/672 #672] | |||
* Basic support for 20.0.0 by [https://github.com/SciresM @SciresM] in [https://github.com/switchbrew/libnx/pull/671 #671] | |||
* Update setsysEdid struct by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/654 #654] | |||
* Fix wrong names in SetSysModeLine by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/656 #656] | |||
* nvchannel: fix submit ioctl by [https://github.com/averne @averne] in [https://github.com/switchbrew/libnx/pull/662 #662] | |||
* nvfence: expose nvhost-ctrl fd by [https://github.com/averne @averne] in [https://github.com/switchbrew/libnx/pull/660 #660] | |||
* hidsys: add commands for setting/checking state of joycons attached via rails by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/657 #657] | |||
* btdrv: misc. fixes and updates to BLE related functions and type definitions by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/658 #658] | |||
* btdrv: document timeout parameter to btdrvTriggerConnection by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/669 #669] | |||
* set: update SetSysBluetoothDevicesSettings with new fields found in recent firmwares by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/667 #667] | |||
* btmsys: add missing 13.0.0 commands by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/664 #664] | |||
* update capsdc for 18.0.0 by [https://github.com/HookedBehemoth @HookedBehemoth] in [https://github.com/switchbrew/libnx/pull/665 #665] | |||
'''v4.8.0''' | |||
* Add missing hid shared memory structures and accessor functions for system buttons by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/647 #647] | |||
* bt: fill in unknowns and update function parameters to match their btdrv counterparts by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/644 #644] | |||
* spl: add missing service header by [https://github.com/IrneRacoonovich @IrneRacoonovich] in [https://github.com/switchbrew/libnx/pull/649 #649] | |||
* Basic support for 19.0.0 by [https://github.com/SciresM @SciresM] in [https://github.com/switchbrew/libnx/pull/651 #651] | |||
* btm: add audio profile by [https://github.com/ndeadly @ndeadly] in [https://github.com/switchbrew/libnx/pull/650 #650] | |||
* use nproc for max jobs on github workflow by [https://github.com/WinterMute @WinterMute] in [https://github.com/switchbrew/libnx/pull/652 #652] | |||
'''v4.7.0''' | |||
* Update SetSysProductModel_Aula comment by [https://github.com/masagrator @masagrator] in [https://github.com/switchbrew/libnx/pull/634 #634] | |||
* Implement FS "ChallengeCardExistence" and "GetGameCardDeviceCertificate" by [https://github.com/EpicUsername12 @EpicUsername12] in [https://github.com/switchbrew/libnx/pull/631 #631] | |||
* nvchannel: Fix SET_CLK_RATE, implement GET_CLK_RATE and SET_SUBMIT_TIMEOUT by [https://github.com/averne @averne] in [https://github.com/switchbrew/libnx/pull/637 #637] | |||
* fs: add GetFileSystemAttribute cmd by [https://github.com/DarkMatterCore @DarkMatterCore] in [https://github.com/switchbrew/libnx/pull/642 #642] | |||
* Basic support for 18.0.0 by [https://github.com/SciresM @SciresM] in [https://github.com/switchbrew/libnx/pull/641 #641] | |||
'''v4.6.0''' | |||
* svc: fix query/insecure names by @SciresM. | |||
* Add NX_ prefix to PACKED, NORETURN, IGNORE_ARG and DEPRECATED macros by @Ghabry. | |||
* Add fsDeviceOperatorGetGameCardUpdatePartitionInfo by @ITotalJustice. | |||
* Fix: avoid segfault at static destructors by @ThisALV. | |||
'''v4.5.0''' | |||
*Services: | |||
**btdrv: Missing definitions for ble were added. | |||
**capsdc: Updated for [17.0.0+]. | |||
**hidsys: Support was added for many commands. | |||
**fs: | |||
***Updated for [17.0.0+]. | |||
***Support was added for many fsDeviceOperator commands. | |||
**ncm: Updated for [17.0.0+]. | |||
**nfc: Support was added for all remaining commands. | |||
**ns: Added nsEstimateSizeToMove. | |||
**pctl: Support was added for many commands. | |||
**ssl: Updated sslConnectionSetPrivateOption for [17.0.0+]. | |||
**ts: Updated for [17.0.0+]. | |||
*Devices: | |||
**socket: Updated wrapper to automatically select latest available bsd service version (fixes multicast support). | |||
*Miscellaneous: | |||
**The linker script/crt0 were updated to support relro. | |||
**A bug was fixed in aes-cbc block decryption. | |||
**A number of problems were corrected involving incorrect ipc serialization with pointer arguments. | |||
*Several issues were fixed, and usability and stability were improved. | |||
'''v4.4.2''' | '''v4.4.2''' | ||
* | *System: | ||
** | **Ensure correct addresses for bss. | ||
* | *Miscellaneous: | ||
** | **Fix timezone to allow +/- and alphanumrics. | ||
** | **End compile_commmands generation when elf linked. | ||
'''v4.4.1''' | '''v4.4.1''' | ||
* | *Miscellaneous: | ||
** | **Add missing separator to local path. | ||
*Several issues were fixed, and usability and stability were improved. | *Several issues were fixed, and usability and stability were improved. | ||
'''v4.4.0''' | '''v4.4.0''' | ||
* | *Services: | ||
** | **Applet: add appletGetMessageEvent. | ||
**usbcomms: add async API | **usbcomms: add async API. | ||
**usbcomms: expose VID:PID configuration | **usbcomms: expose VID:PID configuration. | ||
* | *Miscellaneous: | ||
** | **Correct problems revealed by gcc 13. | ||
** | **Mitigate race condition bug in nvservices. | ||
**Several issues were fixed, and usability and stability were improved. | **Several issues were fixed, and usability and stability were improved. | ||
'''v4.3.0''' | '''v4.3.0''' | ||
* | *Services: | ||
** | **Applet: Updated for [15.0.0+]. Added __nx_applet_init_timeout. | ||
**audctl: | **audctl: | ||
***Added audctlGetActiveOutputTarget. | ***Added audctlGetActiveOutputTarget. | ||
| Line 52: | Line 133: | ||
**auddev: Added auddevGetActiveAudioDeviceName. | **auddev: Added auddevGetActiveAudioDeviceName. | ||
**bpc: Fixed GetSleepButtonState/GetPowerButton. | **bpc: Fixed GetSleepButtonState/GetPowerButton. | ||
**fs: Updated for [16.0.0+] | **fs: Updated for [16.0.0+]. | ||
**hiddbg: Changed hiddbgAttachHdlsWorkBuffer to accept a user-supplied buffer and size. | **hiddbg: Changed hiddbgAttachHdlsWorkBuffer to accept a user-supplied buffer and size. | ||
**ncm: Updated for [15.0.0+] and [16.0.0+]. | **ncm: Updated for [15.0.0+] and [16.0.0+]. | ||
| Line 68: | Line 149: | ||
**vi: Added [16.0.0+] Manager commands. | **vi: Added [16.0.0+] Manager commands. | ||
**wlaninf: Added sysver check to account for its removal in [15.0.0+]. | **wlaninf: Added sysver check to account for its removal in [15.0.0+]. | ||
* | *Devices: | ||
**nxlinkConnectToHost: Added timeout to avoid long hang when -s isn't specified for nxlink. | **nxlinkConnectToHost: Added timeout to avoid long hang when -s isn't specified for nxlink. | ||
* | *Miscellaneous: | ||
**Added CMSG macros to BSD headers. | **Added CMSG macros to BSD headers. | ||
*Several issues were fixed, and usability and stability were improved. | *Several issues were fixed, and usability and stability were improved. | ||
[https://github.com/switchbrew/libnx/releases Release notes.] | |||
== External links == | == External links == | ||
* | * GitHub - https://github.com/switchbrew/libnx | ||
* Documentation - https://switchbrew.github.io/libnx/ | |||
Latest revision as of 06:14, 8 February 2026
| Libnx | |
|---|---|
| General | |
| Author | switchbrew |
| Type | Developments |
| Version | 4.11.1 |
| License | ISC |
| Last Updated | 2026/02/04 |
| Links | |
| Download | |
| Website | |
| Source | |
Nintendo Switch AArch64-only userland library. It is an adaptation of libctru.
See Switchbrew for install instructions.
Features
- Based on libctru.
- Nintendo Switch AArch64-only.
- Userland library.
- Library for Switch Homebrew.
Changelog
v4.11.1
- Change DebugEvent struct name by @masagrator in #707
- Add comments to PsmBatteryChargeInfoFields by @masagrator in #706
v4.11.0
- Add nsGetApplicationControlData2 by @masagrator in #699
- correct internal consoleCls & consoleClearLine calls by @HookedBehemoth in #698
- usb: include additional definitions from libusb by @ndeadly in #704
- psm: add missing functions by @ndeadly in #703
- Add DebugEvent structure for svcGetDebugEvent by @masagrator in #702
- update for dka64 r29.1 by @WinterMute in #705
v4.10.0
- btdrv: label proto_mode field in data_report event info by @ndeadly in #673
- nfp: Improve types and enums by @XorTroll in #675
- btdrv: fix struct alignment issue in BtdrvBleEventInfo by @ndeadly in #680
- remove unused version number in Makefile by @WinterMute in #679
- add usbDsGetSpeed and missing speed enum entries. by @ITotalJustice in #676
- Update SetSysEdid to include different types of Extension blocks by @masagrator in #677
- Cover new Chinese and Brazilian Portuguese language IDs for nacpGetLanguageEntry by @masagrator in #684
- btdrv: fix incorrectly labelled LE connection parameters by @ndeadly in #686
- fix audout events being missed. by @ITotalJustice in #683
- add audout:a audout:d aud:a aud:d by @ITotalJustice in #636
- refactor console code for better ansi escape-code handling by @WinterMute in #682
- fix missing include in switch.h for aud.h by @ITotalJustice in #687
- Update TickCountInfo and IdleTickCount notes by @masagrator in #696
- Basic support for 21.0.0 by @SciresM in #697
- Fix svcSetHeapSize note by @masagrator in #694
- vi: swap close layer commands by @SamoZ256 in #688
- audren: expose frame event. by @ITotalJustice in #689
v4.9.0
- Fixes for GCC 15 by @SciresM in #672
- Basic support for 20.0.0 by @SciresM in #671
- Update setsysEdid struct by @masagrator in #654
- Fix wrong names in SetSysModeLine by @masagrator in #656
- nvchannel: fix submit ioctl by @averne in #662
- nvfence: expose nvhost-ctrl fd by @averne in #660
- hidsys: add commands for setting/checking state of joycons attached via rails by @ndeadly in #657
- btdrv: misc. fixes and updates to BLE related functions and type definitions by @ndeadly in #658
- btdrv: document timeout parameter to btdrvTriggerConnection by @ndeadly in #669
- set: update SetSysBluetoothDevicesSettings with new fields found in recent firmwares by @ndeadly in #667
- btmsys: add missing 13.0.0 commands by @ndeadly in #664
- update capsdc for 18.0.0 by @HookedBehemoth in #665
v4.8.0
- Add missing hid shared memory structures and accessor functions for system buttons by @ndeadly in #647
- bt: fill in unknowns and update function parameters to match their btdrv counterparts by @ndeadly in #644
- spl: add missing service header by @IrneRacoonovich in #649
- Basic support for 19.0.0 by @SciresM in #651
- btm: add audio profile by @ndeadly in #650
- use nproc for max jobs on github workflow by @WinterMute in #652
v4.7.0
- Update SetSysProductModel_Aula comment by @masagrator in #634
- Implement FS "ChallengeCardExistence" and "GetGameCardDeviceCertificate" by @EpicUsername12 in #631
- nvchannel: Fix SET_CLK_RATE, implement GET_CLK_RATE and SET_SUBMIT_TIMEOUT by @averne in #637
- fs: add GetFileSystemAttribute cmd by @DarkMatterCore in #642
- Basic support for 18.0.0 by @SciresM in #641
v4.6.0
- svc: fix query/insecure names by @SciresM.
- Add NX_ prefix to PACKED, NORETURN, IGNORE_ARG and DEPRECATED macros by @Ghabry.
- Add fsDeviceOperatorGetGameCardUpdatePartitionInfo by @ITotalJustice.
- Fix: avoid segfault at static destructors by @ThisALV.
v4.5.0
- Services:
- btdrv: Missing definitions for ble were added.
- capsdc: Updated for [17.0.0+].
- hidsys: Support was added for many commands.
- fs:
- Updated for [17.0.0+].
- Support was added for many fsDeviceOperator commands.
- ncm: Updated for [17.0.0+].
- nfc: Support was added for all remaining commands.
- ns: Added nsEstimateSizeToMove.
- pctl: Support was added for many commands.
- ssl: Updated sslConnectionSetPrivateOption for [17.0.0+].
- ts: Updated for [17.0.0+].
- Devices:
- socket: Updated wrapper to automatically select latest available bsd service version (fixes multicast support).
- Miscellaneous:
- The linker script/crt0 were updated to support relro.
- A bug was fixed in aes-cbc block decryption.
- A number of problems were corrected involving incorrect ipc serialization with pointer arguments.
- Several issues were fixed, and usability and stability were improved.
v4.4.2
- System:
- Ensure correct addresses for bss.
- Miscellaneous:
- Fix timezone to allow +/- and alphanumrics.
- End compile_commmands generation when elf linked.
v4.4.1
- Miscellaneous:
- Add missing separator to local path.
- Several issues were fixed, and usability and stability were improved.
v4.4.0
- Services:
- Applet: add appletGetMessageEvent.
- usbcomms: add async API.
- usbcomms: expose VID:PID configuration.
- Miscellaneous:
- Correct problems revealed by gcc 13.
- Mitigate race condition bug in nvservices.
- Several issues were fixed, and usability and stability were improved.
v4.3.0
- Services:
- Applet: Updated for [15.0.0+]. Added __nx_applet_init_timeout.
- audctl:
- Added audctlGetActiveOutputTarget.
- Fixed TargetVolume functions.
- auddev: Added auddevGetActiveAudioDeviceName.
- bpc: Fixed GetSleepButtonState/GetPowerButton.
- fs: Updated for [16.0.0+].
- hiddbg: Changed hiddbgAttachHdlsWorkBuffer to accept a user-supplied buffer and size.
- ncm: Updated for [15.0.0+] and [16.0.0+].
- pdm:
- Updated for [16.0.0+].
- Fixed pdmqryQueryAccountEvent on older sysvers.
- Updated structs.
- pl: Added [16.0.0+] sysver checks.
- ssl:
- Added support for new [16.0.0+] functionality.
- Added ssl:s support [15.0.0+].
- Added sslClearTls12FallbackFlag [14.0.0+].
- Updated SslCaCertificateId enum.
- usbhs: Added the remaining cmds and expose more functionality.
- vi: Added [16.0.0+] Manager commands.
- wlaninf: Added sysver check to account for its removal in [15.0.0+].
- Devices:
- nxlinkConnectToHost: Added timeout to avoid long hang when -s isn't specified for nxlink.
- Miscellaneous:
- Added CMSG macros to BSD headers.
- Several issues were fixed, and usability and stability were improved.
External links
- GitHub - https://github.com/switchbrew/libnx
- Documentation - https://switchbrew.github.io/libnx/