From 4177031ebe7104092cc889262bb0bcd445d6d09a Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 26 Aug 2019 12:43:01 -0400 Subject: [PATCH] Use the same style for all system-versions. --- nx/include/switch/applets/swkbd.h | 10 +++++----- nx/include/switch/kernel/jit.h | 2 +- nx/include/switch/kernel/svc.h | 28 ++++++++++++++-------------- nx/include/switch/services/bsd.h | 2 +- nx/include/switch/services/capssc.h | 4 ++-- nx/include/switch/services/capssu.h | 2 +- nx/include/switch/services/fatal.h | 2 +- nx/include/switch/services/fs.h | 18 +++++++++--------- nx/include/switch/services/hwopus.h | 2 +- nx/include/switch/services/pm.h | 6 +++--- nx/include/switch/services/usbds.h | 8 ++++---- nx/include/switch/services/usbhs.h | 2 +- nx/source/applets/swkbd.c | 4 ++-- nx/source/kernel/detect.c | 2 +- nx/source/kernel/jit.c | 4 ++-- nx/source/kernel/virtmem.c | 2 +- nx/source/services/fatal.c | 2 +- 17 files changed, 50 insertions(+), 50 deletions(-) diff --git a/nx/include/switch/applets/swkbd.h b/nx/include/switch/applets/swkbd.h index 4b917e03..d139f185 100644 --- a/nx/include/switch/applets/swkbd.h +++ b/nx/include/switch/applets/swkbd.h @@ -39,7 +39,7 @@ enum { typedef enum { SwkbdTextDrawType_Line = 0, ///< The text will be displayed on a line. Also enables displaying the Header and Sub text. SwkbdTextDrawType_Box = 1, ///< The text will be displayed in a box. - SwkbdTextDrawType_DownloadCode = 2, ///< Used by \ref swkbdConfigMakePresetDownloadCode on 5.0.0+. Enables using \ref SwkbdArgV7 unk_x3e0. + SwkbdTextDrawType_DownloadCode = 2, ///< Used by \ref swkbdConfigMakePresetDownloadCode on [5.0.0+]. Enables using \ref SwkbdArgV7 unk_x3e0. } SwkbdTextDrawType; /// SwkbdInline Interactive input storage request ID. @@ -182,7 +182,7 @@ typedef struct { typedef struct { u32 unk_x0; u8 mode; ///< See \ref SwkbdInlineMode. (u8 bool) - u8 unk_x5; ///< Only set on 5.0.0+. + u8 unk_x5; ///< Only set on [5.0.0+]. u8 pad[2]; } SwkbdInitializeArg; @@ -217,7 +217,7 @@ typedef struct { u16 inputText[0x3f4/2]; ///< Flags bitmask 0x8. u8 utf8Mode; ///< Flags bitmask 0x20. u8 unk_x45d; - u8 enableBackspace; ///< Flags bitmask 0x8000. Only available with 5.0.0+. + u8 enableBackspace; ///< Flags bitmask 0x8000. Only available with [5.0.0+]. u8 unk_x45f[3]; u8 keytopAsFloating; ///< Flags bitmask 0x200. u8 footerScalable; ///< Flags bitmask 0x100. @@ -237,7 +237,7 @@ typedef struct { float balloonScale; ///< Flags bitmask 0x200. float unk_x48c; u8 unk_x490[0xc]; - u8 seGroup; ///< Flags bitmask: enable=0x2000, disable=0x4000. Only available with 5.0.0+. + u8 seGroup; ///< Flags bitmask: enable=0x2000, disable=0x4000. Only available with [5.0.0+]. u8 triggerFlag; ///< [6.0.0+] Enables using the trigger field when set. u8 trigger; ///< [6.0.0+] Trigger u8 pad_x49f; @@ -363,7 +363,7 @@ void swkbdConfigMakePresetUserName(SwkbdConfig* c); /** * @brief Clears the args in the SwkbdConfig struct and initializes it with the DownloadCode Preset. * @note Do not use this before \ref swkbdCreate. - * @note Uses the following: swkbdConfigSetType() with \ref SwkbdType_Normal (\ref SwkbdType_QWERTY on 5.0.0+), swkbdConfigSetKeySetDisableBitmask() with SwkbdKeyDisableBitmask_DownloadCode, swkbdConfigSetInitialCursorPos() with value 1, and swkbdConfigSetBlurBackground() with value 1. 5.0.0+: swkbdConfigSetStringLenMax() with value 16, swkbdConfigSetStringLenMaxExt() with value 1, and swkbdConfigSetTextDrawType() with SwkbdTextDrawType_DownloadCode. Uses swkbdConfigSetTextGrouping() for [0-2] with: 0x3, 0x7, and 0xb. + * @note Uses the following: swkbdConfigSetType() with \ref SwkbdType_Normal (\ref SwkbdType_QWERTY on [5.0.0+]), swkbdConfigSetKeySetDisableBitmask() with SwkbdKeyDisableBitmask_DownloadCode, swkbdConfigSetInitialCursorPos() with value 1, and swkbdConfigSetBlurBackground() with value 1. [5.0.0+]: swkbdConfigSetStringLenMax() with value 16, swkbdConfigSetStringLenMaxExt() with value 1, and swkbdConfigSetTextDrawType() with SwkbdTextDrawType_DownloadCode. Uses swkbdConfigSetTextGrouping() for [0-2] with: 0x3, 0x7, and 0xb. * @param c SwkbdConfig struct. */ void swkbdConfigMakePresetDownloadCode(SwkbdConfig* c); diff --git a/nx/include/switch/kernel/jit.h b/nx/include/switch/kernel/jit.h index f6261663..3fa188dc 100644 --- a/nx/include/switch/kernel/jit.h +++ b/nx/include/switch/kernel/jit.h @@ -10,7 +10,7 @@ /// JIT implementation type. typedef enum { JitType_CodeMemory, ///< JIT supported using svcSetProcessMemoryPermission - JitType_JitMemory, ///< JIT supported using 4.0.0+ code-memory syscalls (this isn't usable on 5.0.0+ so JitType_CodeMemory is used instead). + JitType_JitMemory, ///< JIT supported using [4.0.0+] code-memory syscalls (this isn't usable on [5.0.0+] so JitType_CodeMemory is used instead). } JitType; /// JIT buffer object. diff --git a/nx/include/switch/kernel/svc.h b/nx/include/switch/kernel/svc.h index 51fcaeaa..752451fc 100644 --- a/nx/include/switch/kernel/svc.h +++ b/nx/include/switch/kernel/svc.h @@ -157,18 +157,18 @@ typedef enum { InfoType_DebuggerAttached = 8, ///< Whether current process is being debugged. InfoType_ResourceLimit = 9, ///< Current process's resource limit handle. InfoType_IdleTickCount = 10, ///< Number of idle ticks on CPU. - InfoType_RandomEntropy = 11, ///< 2.0.0+ Random entropy for current process. - InfoType_AslrRegionAddress = 12, ///< 2.0.0+ Base of the process's address space. - InfoType_AslrRegionSize = 13, ///< 2.0.0+ Size of the process's address space. - InfoType_StackRegionAddress = 14, ///< 2.0.0+ Base of the Stack memory region. - InfoType_StackRegionSize = 15, ///< 2.0.0+ Size of the Stack memory region. - InfoType_SystemResourceSizeTotal = 16, ///< 3.0.0+ Total memory allocated for process memory management. - InfoType_SystemResourceSizeUsed = 17, ///< 3.0.0+ Amount of memory currently used by process memory management. - InfoType_TitleId = 18, ///< 3.0.0+ Title ID for the process. - InfoType_InitialProcessIdRange = 19, ///< 4.0.0-4.1.0 Min/max initial process IDs. - InfoType_UserExceptionContextAddress = 20, ///< 5.0.0+ Address of the process's exception context (for break). - InfoType_TotalNonSystemMemorySize = 21, ///< 6.0.0+ Total amount of memory available for process, excluding that for process memory management. - InfoType_UsedNonSystemMemorySize = 22, ///< 6.0.0+ Amount of memory used by process, excluding that for process memory management. + InfoType_RandomEntropy = 11, ///< [2.0.0+] Random entropy for current process. + InfoType_AslrRegionAddress = 12, ///< [2.0.0+] Base of the process's address space. + InfoType_AslrRegionSize = 13, ///< [2.0.0+] Size of the process's address space. + InfoType_StackRegionAddress = 14, ///< [2.0.0+] Base of the Stack memory region. + InfoType_StackRegionSize = 15, ///< [2.0.0+] Size of the Stack memory region. + InfoType_SystemResourceSizeTotal = 16, ///< [3.0.0+] Total memory allocated for process memory management. + InfoType_SystemResourceSizeUsed = 17, ///< [3.0.0+] Amount of memory currently used by process memory management. + InfoType_TitleId = 18, ///< [3.0.0+] Title ID for the process. + InfoType_InitialProcessIdRange = 19, ///< [4.0.0-4.1.0] Min/max initial process IDs. + InfoType_UserExceptionContextAddress = 20, ///< [5.0.0+] Address of the process's exception context (for break). + InfoType_TotalNonSystemMemorySize = 21, ///< [6.0.0+] Total amount of memory available for process, excluding that for process memory management. + InfoType_UsedNonSystemMemorySize = 22, ///< [6.0.0+] Amount of memory used by process, excluding that for process memory management. InfoType_ThreadTickCount = 0xF0000002, ///< Number of ticks spent on thread. } InfoType; @@ -928,7 +928,7 @@ Result svcGetDebugEvent(u8* event_out, Handle debug); * @return Result code. * @note Syscall number 0x64. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. - * @warning Only exists on 3.0.0+. For older versions use \ref svcLegacyContinueDebugEvent. + * @warning Only exists on [3.0.0+]. For older versions use \ref svcLegacyContinueDebugEvent. */ Result svcContinueDebugEvent(Handle debug, u32 flags, u64* tid_list, u32 num_tids); @@ -937,7 +937,7 @@ Result svcContinueDebugEvent(Handle debug, u32 flags, u64* tid_list, u32 num_tid * @return Result code. * @note Syscall number 0x64. * @warning This is a privileged syscall. Use \ref envIsSyscallHinted to check if it is available. - * @warning Only exists on 1.0.0-2.3.0. For newer versions use \ref svcContinueDebugEvent. + * @warning Only exists on [1.0.0-2.3.0]. For newer versions use \ref svcContinueDebugEvent. */ Result svcLegacyContinueDebugEvent(Handle debug, u32 flags, u64 threadID); diff --git a/nx/include/switch/services/bsd.h b/nx/include/switch/services/bsd.h index ab14a295..5a3164d5 100644 --- a/nx/include/switch/services/bsd.h +++ b/nx/include/switch/services/bsd.h @@ -16,7 +16,7 @@ /// Configuration structure for bsdInitalize typedef struct { - u32 version; ///< Observed 1 on 2.0 LibAppletWeb, 2 on 3.0. + u32 version; ///< Observed 1 on [2.0.0+] LibAppletWeb, 2 on [3.0.0+]. u32 tcp_tx_buf_size; ///< Size of the TCP transfer (send) buffer (initial or fixed). u32 tcp_rx_buf_size; ///< Size of the TCP recieve buffer (initial or fixed). diff --git a/nx/include/switch/services/capssc.h b/nx/include/switch/services/capssc.h index ae3d6e82..06250829 100644 --- a/nx/include/switch/services/capssc.h +++ b/nx/include/switch/services/capssc.h @@ -9,14 +9,14 @@ #include "../services/sm.h" #include "../services/caps.h" -/// Initialize caps:sc. Only available on 2.0.0+. +/// Initialize caps:sc. Only available on [2.0.0+]. Result capsscInitialize(void); void capsscExit(void); Service* capsscGetServiceSession(void); /** * @brief This takes a screenshot, with the screenshot being written into the output buffer. - * @note Not available with 5.0.0+ (stubbed). + * @note Not available with [5.0.0+] (stubbed). * @note buffer_index and buffer_count correspond to buffers with size 0x384000(1280*720*4). These must not be negative. * @param buf Output buffer containing the RGBA8 image. * @param size Size of buf, should be 0x384000(1280*720*4) * buffer_count. diff --git a/nx/include/switch/services/capssu.h b/nx/include/switch/services/capssu.h index 449c632a..b4e910c8 100644 --- a/nx/include/switch/services/capssu.h +++ b/nx/include/switch/services/capssu.h @@ -9,7 +9,7 @@ #include "../services/sm.h" #include "../services/caps.h" -/// Initialize caps:su. Only available on 4.0.0+. +/// Initialize caps:su. Only available on [4.0.0+]. Result capssuInitialize(void); void capssuExit(void); Service* capssuGetServiceSession(void); diff --git a/nx/include/switch/services/fatal.h b/nx/include/switch/services/fatal.h index 0f1f30d1..5b294108 100644 --- a/nx/include/switch/services/fatal.h +++ b/nx/include/switch/services/fatal.h @@ -11,7 +11,7 @@ typedef enum { FatalType_ErrorReportAndErrorScreen = 0, FatalType_ErrorReport = 1, - FatalType_ErrorScreen = 2 ///< Only available with 3.0.0+. If specified, FatalType_ErrorReportAndErrorScreen will be used instead on pre-3.0.0. + FatalType_ErrorScreen = 2 ///< Only available with [3.0.0+]. If specified, FatalType_ErrorReportAndErrorScreen will be used instead on pre-3.0.0. } FatalType; /// Struct for fatal Cpu context, 64-bit. diff --git a/nx/include/switch/services/fs.h b/nx/include/switch/services/fs.h index 59af3c7a..3d706054 100644 --- a/nx/include/switch/services/fs.h +++ b/nx/include/switch/services/fs.h @@ -278,7 +278,7 @@ Result fsOpenGameCardFileSystem(FsFileSystem* out, const FsGameCardHandle* handl Result fsReadSaveDataFileSystemExtraDataBySaveDataSpaceId(void* buf, size_t len, FsSaveDataSpaceId saveDataSpaceId, u64 saveID); Result fsReadSaveDataFileSystemExtraData(void* buf, size_t len, u64 saveID); Result fsWriteSaveDataFileSystemExtraData(const void* buf, size_t len, FsSaveDataSpaceId saveDataSpaceId, u64 saveID); -Result fsExtendSaveDataFileSystem(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, s64 dataSize, s64 journalSize); /// 3.0.0+ +Result fsExtendSaveDataFileSystem(FsSaveDataSpaceId saveDataSpaceId, u64 saveID, s64 dataSize, s64 journalSize); /// [3.0.0+] /// Do not call this directly, see fs_dev.h. Result fsMountSdcard(FsFileSystem* out); @@ -287,7 +287,7 @@ Result fsMountSaveData(FsFileSystem* out, u8 inval, FsSave *save); Result fsMountSystemSaveData(FsFileSystem* out, u8 inval, FsSave *save); Result fsOpenSaveDataIterator(FsSaveDataIterator* out, s32 saveDataSpaceId); Result fsOpenContentStorageFileSystem(FsFileSystem* out, FsContentStorageId content_storage_id); -Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); /// 7.0.0+ +Result fsOpenCustomStorageFileSystem(FsFileSystem* out, FsCustomStorageId custom_storage_id); /// [7.0.0+] Result fsOpenDataStorageByCurrentProcess(FsStorage* out); Result fsOpenDataStorageByDataId(FsStorage* out, u64 dataId, FsStorageId storageId); Result fsOpenDeviceOperator(FsDeviceOperator* out); @@ -336,8 +336,8 @@ typedef enum /// Mount requested filesystem type from content file Result fsOpenFileSystem(FsFileSystem* out, FsFileSystemType fsType, const char* contentPath); /// same as calling fsOpenFileSystemWithId with 0 as titleId -Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath); /// works on all firmwares, titleId is ignored on 1.0.0 -Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 titleId, FsFileSystemType fsType); /// 2.0.0+, like OpenFileSystemWithId but without content path. +Result fsOpenFileSystemWithId(FsFileSystem* out, u64 titleId, FsFileSystemType fsType, const char* contentPath); /// works on all firmwares, titleId is ignored on [1.0.0] +Result fsOpenFileSystemWithPatch(FsFileSystem* out, u64 titleId, FsFileSystemType fsType); /// [2.0.0+], like OpenFileSystemWithId but without content path. // IFileSystem Result fsFsCreateFile(FsFileSystem* fs, const char* path, size_t size, int flags); @@ -353,9 +353,9 @@ Result fsFsOpenDirectory(FsFileSystem* fs, const char* path, int flags, FsDir* o Result fsFsCommit(FsFileSystem* fs); Result fsFsGetFreeSpace(FsFileSystem* fs, const char* path, u64* out); Result fsFsGetTotalSpace(FsFileSystem* fs, const char* path, u64* out); -Result fsFsGetFileTimeStampRaw(FsFileSystem* fs, const char* path, FsTimeStampRaw *out);/// 3.0.0+ -Result fsFsCleanDirectoryRecursively(FsFileSystem* fs, const char* path);/// 3.0.0+ -Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *in, size_t in_size, const char* path, FsFileSystemQueryType query_type);/// 4.0.0+ +Result fsFsGetFileTimeStampRaw(FsFileSystem* fs, const char* path, FsTimeStampRaw *out); /// [3.0.0+] +Result fsFsCleanDirectoryRecursively(FsFileSystem* fs, const char* path); /// [3.0.0+] +Result fsFsQueryEntry(FsFileSystem* fs, void *out, size_t out_size, const void *in, size_t in_size, const char* path, FsFileSystemQueryType query_type); /// [4.0.0+] void fsFsClose(FsFileSystem* fs); /// Uses \ref fsFsQueryEntry to set the archive bit on the specified absolute directory path. @@ -368,7 +368,7 @@ Result fsFileWrite(FsFile* f, u64 off, const void* buf, size_t len, u32 option); Result fsFileFlush(FsFile* f); Result fsFileSetSize(FsFile* f, u64 sz); Result fsFileGetSize(FsFile* f, u64* out); -Result fsFileOperateRange(FsFile* f, FsOperationId op_id, u64 off, size_t len, FsRangeInfo* out); /// 4.0.0+ +Result fsFileOperateRange(FsFile* f, FsOperationId op_id, u64 off, size_t len, FsRangeInfo* out); /// [4.0.0+] void fsFileClose(FsFile* f); // IDirectory @@ -382,7 +382,7 @@ Result fsStorageWrite(FsStorage* s, u64 off, const void* buf, size_t len); Result fsStorageFlush(FsStorage* s); Result fsStorageSetSize(FsStorage* s, u64 sz); Result fsStorageGetSize(FsStorage* s, u64* out); -Result fsStorageOperateRange(FsStorage* s, FsOperationId op_id, u64 off, size_t len, FsRangeInfo* out); /// 4.0.0+ +Result fsStorageOperateRange(FsStorage* s, FsOperationId op_id, u64 off, size_t len, FsRangeInfo* out); /// [4.0.0+] void fsStorageClose(FsStorage* s); // ISaveDataInfoReader diff --git a/nx/include/switch/services/hwopus.h b/nx/include/switch/services/hwopus.h index 655f4751..8598b323 100644 --- a/nx/include/switch/services/hwopus.h +++ b/nx/include/switch/services/hwopus.h @@ -34,7 +34,7 @@ typedef struct { Result hwopusDecoderInitialize(HwopusDecoder* decoder, s32 SampleRate, s32 ChannelCount); void hwopusDecoderExit(HwopusDecoder* decoder); -/// Only available on 3.0.0+. +/// Only available on [3.0.0+]. /// See libopus multistream docs. Result hwopusDecoderMultistreamInitialize(HwopusDecoder* decoder, s32 SampleRate, s32 ChannelCount, s32 TotalStreamCount, s32 StereoStreamCount, u8 *channel_mapping); diff --git a/nx/include/switch/services/pm.h b/nx/include/switch/services/pm.h index 1505700e..3ab480ba 100644 --- a/nx/include/switch/services/pm.h +++ b/nx/include/switch/services/pm.h @@ -15,7 +15,7 @@ typedef enum { PmLaunchFlag_None = 0, - ///< PmLaunchFlag_* should be used on 5.0.0+. + ///< PmLaunchFlag_* should be used on [5.0.0+]. PmLaunchFlag_SignalOnExit = (1 << 0), PmLaunchFlag_SignalOnStart = (1 << 1), PmLaunchFlag_SignalOnCrash = (1 << 2), @@ -23,13 +23,13 @@ typedef enum { PmLaunchFlag_StartSuspended = (1 << 4), PmLaunchFlag_DisableAslr = (1 << 5), - ///< PmLaunchFlagOld_* should be used on 1.0.0-4.1.0. + ///< PmLaunchFlagOld_* should be used on [1.0.0-4.1.0]. PmLaunchFlagOld_SignalOnExit = (1 << 0), PmLaunchFlagOld_StartSuspended = (1 << 1), PmLaunchFlagOld_SignalOnCrash = (1 << 2), PmLaunchFlagOld_DisableAslr = (1 << 3), PmLaunchFlagOld_SignalOnDebug = (1 << 4), - ///< PmLaunchFlagOld_SignalOnStart was added in 2.0.0. + ///< PmLaunchFlagOld_SignalOnStart is only available on [2.0.0+]. PmLaunchFlagOld_SignalOnStart = (1 << 5), } PmLaunchFlag; diff --git a/nx/include/switch/services/usbds.h b/nx/include/switch/services/usbds.h index 1beb9ef0..fe3c3c6d 100644 --- a/nx/include/switch/services/usbds.h +++ b/nx/include/switch/services/usbds.h @@ -74,11 +74,11 @@ Result usbDsParseReportData(UsbDsReportData *reportdata, u32 urbId, u32 *request Event* usbDsGetStateChangeEvent(void); Result usbDsGetState(u32* out); -/// Removed in 5.0.0 +/// Removed in [5.0.0+] Result usbDsGetDsInterface(UsbDsInterface** out, struct usb_interface_descriptor* descriptor, const char* interface_name); Result usbDsSetVidPidBcd(const UsbDsDeviceInfo* deviceinfo); -/// Added in 5.0.0 +/// Added in [5.0.0+] Result usbDsRegisterInterface(UsbDsInterface** out); Result usbDsRegisterInterfaceEx(UsbDsInterface** out, u32 intf_num); Result usbDsClearDeviceData(void); @@ -102,10 +102,10 @@ Result usbDsInterface_GetCtrlInReportData(UsbDsInterface* interface, UsbDsReport Result usbDsInterface_GetCtrlOutReportData(UsbDsInterface* interface, UsbDsReportData* out); Result usbDsInterface_StallCtrl(UsbDsInterface* interface); -/// Removed in 5.0.0 +/// Removed in [5.0.0+] Result usbDsInterface_GetDsEndpoint(UsbDsInterface* interface, UsbDsEndpoint** endpoint, struct usb_endpoint_descriptor* descriptor); -/// Added in 5.0.0 +/// Added in [5.0.0+] Result usbDsInterface_RegisterEndpoint(UsbDsInterface* interface, UsbDsEndpoint** endpoint, u8 endpoint_address); Result usbDsInterface_AppendConfigurationData(UsbDsInterface* interface, UsbDeviceSpeed speed, const void* buffer, size_t size); diff --git a/nx/include/switch/services/usbhs.h b/nx/include/switch/services/usbhs.h index c8ba0bea..b6937767 100644 --- a/nx/include/switch/services/usbhs.h +++ b/nx/include/switch/services/usbhs.h @@ -198,7 +198,7 @@ Result usbHsIfGetInterface(UsbHsClientIfSession* s, UsbHsInterfaceInfo* inf); */ Result usbHsIfGetAlternateInterface(UsbHsClientIfSession* s, UsbHsInterfaceInfo* inf, u8 id); -/// On 1.0.0 this is stubbed, just returns 0 with out=0. +/// On [1.0.0] this is stubbed, just returns 0 with out=0. Result usbHsIfGetCurrentFrame(UsbHsClientIfSession* s, u32* out); /// Uses a control transfer, this will block until the transfer finishes. The buffer address and size should be aligned to 0x1000-bytes, where wLength is the original size. diff --git a/nx/source/applets/swkbd.c b/nx/source/applets/swkbd.c index bbcf1118..b41af807 100644 --- a/nx/source/applets/swkbd.c +++ b/nx/source/applets/swkbd.c @@ -65,7 +65,7 @@ static void _swkbdInitVersion(u32* version) { else if (hosver >= MAKEHOSVERSION(2,0,0)) *version = 0x10006; else - *version=0x5;//1.0.0+ version + *version=0x5; // [1.0.0+] version } Result swkbdCreate(SwkbdConfig* c, s32 max_dictwords) { @@ -385,7 +385,7 @@ Result swkbdInlineCreate(SwkbdInline* s) { _swkbdInitVersion(&s->version); - //swkbd-inline is only available on 2.0.0+. + // swkbd-inline is only available on [2.0.0+]. if (s->version < 0x10006) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); s->calcArg.unk_x0 = 0x30000; diff --git a/nx/source/kernel/detect.c b/nx/source/kernel/detect.c index 7528eb84..8ca32d4f 100644 --- a/nx/source/kernel/detect.c +++ b/nx/source/kernel/detect.c @@ -64,7 +64,7 @@ static void _CacheJitKernelPatch(void) rc = svcCreateCodeMemory(&code, heap, 0x1000); if (R_SUCCEEDED(rc)) { - // On an unpatched kernel on 5.0.0 and above, this would return InvalidMemoryState (0xD401). + // On an unpatched kernel on [5.0.0+], this would return InvalidMemoryState (0xD401). // It is not allowed for the creator-process of a CodeMemory object to use svcControlCodeMemory on it. // If the patch is present, the function should return InvalidEnumValue (0xF001), because -1 is not a valid enum CodeOperation. rc = svcControlCodeMemory(code, -1, 0, 0x1000, 0); diff --git a/nx/source/kernel/jit.c b/nx/source/kernel/jit.c index 1cbb06b4..a867e145 100644 --- a/nx/source/kernel/jit.c +++ b/nx/source/kernel/jit.c @@ -13,8 +13,8 @@ Result jitCreate(Jit* j, size_t size) { JitType type; - // Use new jit primitive introduced in 4.0.0, if available. - // Not usable with 5.0.0+ since svcMapJitMemory doesn't allow using that SVC under the same process which owns that object. + // Use new jit primitive introduced in [4.0.0+], if available. + // Not usable with [5.0.0+] since svcMapJitMemory doesn't allow using that SVC under the same process which owns that object. if (kernelAbove400() && envIsSyscallHinted(0x4B) && envIsSyscallHinted(0x4C) && (!kernelAbove500() || detectJitKernelPatch())) { type = JitType_JitMemory; diff --git a/nx/source/kernel/virtmem.c b/nx/source/kernel/virtmem.c index 6afb9e27..6e7fe1e1 100644 --- a/nx/source/kernel/virtmem.c +++ b/nx/source/kernel/virtmem.c @@ -46,7 +46,7 @@ static inline bool _InRegion(VirtualRegion* r, u64 addr) { void virtmemSetup(void) { if (R_FAILED(_GetRegionFromInfo(&g_AddressSpace, InfoType_AslrRegionAddress, InfoType_AslrRegionSize))) { - // 1.0.0 doesn't expose address space size so we have to do this dirty hack to detect it. + // [1.0.0] doesn't expose address space size so we have to do this dirty hack to detect it. // Forgive me. Result rc = svcUnmapMemory((void*) 0xFFFFFFFFFFFFE000ULL, (void*) 0xFFFFFE000ull, 0x1000); diff --git a/nx/source/services/fatal.c b/nx/source/services/fatal.c index d9a08c7c..ac66b063 100644 --- a/nx/source/services/fatal.c +++ b/nx/source/services/fatal.c @@ -10,7 +10,7 @@ static void _fatalImpl(u32 cmd_id, Result err, FatalType type, FatalContext *ctx) { Result rc = 0; - //Only 3.0.0+ supports FatalType_ErrorScreen, when specified on pre-3.0.0 use FatalType_ErrorReportAndErrorScreen instead. + //Only [3.0.0+] supports FatalType_ErrorScreen, when specified on pre-3.0.0 use FatalType_ErrorReportAndErrorScreen instead. if (type == FatalType_ErrorScreen && !kernelAbove300()) type = FatalType_ErrorReportAndErrorScreen; if (detectDebugger()) {