diff --git a/include/coreinit/filesystem.h b/include/coreinit/filesystem.h index f679ecd7..8cc90222 100644 --- a/include/coreinit/filesystem.h +++ b/include/coreinit/filesystem.h @@ -35,7 +35,8 @@ typedef struct FSDirectoryEntry FSDirectoryEntry; typedef struct FSMessage FSMessage; typedef struct FSMountSource FSMountSource; typedef struct FSStat FSStat; -typedef struct FSStateChangeInfo FSStateChangeInfo; +typedef struct FSStateChangeParams FSStateChangeParams; +typedef struct FSStateChangeParams FSStateChangeInfo; typedef struct FSVolumeInfo FSVolumeInfo; typedef enum FSErrorFlag @@ -175,6 +176,7 @@ typedef enum FSMountSourceType } FSMountSourceType; typedef void(*FSAsyncCallback)(FSClient *, FSCmdBlock *, FSStatus, uint32_t); +typedef void(*FSStateChangeCallback)(FSClient *, FSVolumeState, void *); struct FSClient { @@ -214,11 +216,13 @@ WUT_CHECK_OFFSET(FSStat, 0x24, created); WUT_CHECK_OFFSET(FSStat, 0x2C, modified); WUT_CHECK_SIZE(FSStat, 0x64); -struct FSStateChangeInfo +struct FSStateChangeParams { - WUT_UNKNOWN_BYTES(0xC); + FSStateChangeCallback callback; + void *param; + uint32_t unk_0x08; }; -WUT_CHECK_SIZE(FSStateChangeInfo, 0xC); +WUT_CHECK_SIZE(FSStateChangeParams, 0xC); struct FSMessage { @@ -321,7 +325,7 @@ FSSetCmdPriority(FSCmdBlock *block, void FSSetStateChangeNotification(FSClient *client, - FSStateChangeInfo *info); + FSStateChangeParams *info); FSStatus FSGetCwd(FSClient *client, @@ -690,6 +694,9 @@ FSRenameAsync(FSClient *client, FSVolumeState FSGetVolumeState(FSClient *client); +FSError +FSGetLastError(FSClient *client); + FSError FSGetLastErrorCodeForViewer(FSClient *client); diff --git a/include/coreinit/userconfig.h b/include/coreinit/userconfig.h index ac73af18..358111b9 100644 --- a/include/coreinit/userconfig.h +++ b/include/coreinit/userconfig.h @@ -14,6 +14,7 @@ extern "C" { #endif typedef int32_t UCError; +typedef int32_t UCHandle; typedef struct UCSysConfig UCSysConfig; typedef struct UCAsyncParams UCAsyncParams; @@ -135,41 +136,41 @@ WUT_CHECK_OFFSET(UCAsyncParams, 0x14, settings); WUT_CHECK_OFFSET(UCAsyncParams, 0x18, vecs); WUT_CHECK_SIZE(UCAsyncParams, 0x1C); -UCError +UCHandle UCOpen(); UCError -UCClose(IOSHandle handle); +UCClose(UCHandle handle); UCError -UCDeleteSysConfig(int32_t handle, +UCDeleteSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings); UCError -UCDeleteSysConfigAsync(int32_t handle, +UCDeleteSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams); UCError -UCReadSysConfig(int32_t handle, +UCReadSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings); UCError -UCReadSysConfigAsync(int32_t handle, +UCReadSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams); UCError -UCWriteSysConfig(int32_t handle, +UCWriteSysConfig(UCHandle handle, uint32_t count, UCSysConfig *settings); UCError -UCWriteSysConfigAsync(int32_t handle, +UCWriteSysConfigAsync(UCHandle handle, uint32_t count, UCSysConfig *settings, UCAsyncParams *asyncParams); diff --git a/include/nn/act/client_cpp.h b/include/nn/act/client_cpp.h index 195894c3..e4f3e47a 100644 --- a/include/nn/act/client_cpp.h +++ b/include/nn/act/client_cpp.h @@ -109,7 +109,7 @@ GetParentalControlsSlotNo(void) asm("GetParentalControlSlotNo__Q2_2nn3actFv"); nn::Result -GetParentalControlsSlotNoEx(void) +GetParentalControlsSlotNoEx(SlotNo *outSlotNo, SlotNo slot) asm("GetParentalControlSlotNoEx__Q2_2nn3actFPUcUc"); PersistentId