mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Use the same style for all system-versions.
This commit is contained in:
parent
6246f56305
commit
4177031ebe
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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).
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user