mirror of
https://github.com/devkitPro/wut.git
synced 2026-09-07 18:55:41 -05:00
Add functions used in SCI lib (#211)
* Add functions used in SCI lib * fix for older code using FSStateChangeInfo just a typedef `typedef struct FSStateChangeParams FSStateChangeInfo`
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -109,7 +109,7 @@ GetParentalControlsSlotNo(void)
|
||||
asm("GetParentalControlSlotNo__Q2_2nn3actFv");
|
||||
|
||||
nn::Result
|
||||
GetParentalControlsSlotNoEx(void)
|
||||
GetParentalControlsSlotNoEx(SlotNo *outSlotNo, SlotNo slot)
|
||||
asm("GetParentalControlSlotNoEx__Q2_2nn3actFPUcUc");
|
||||
|
||||
PersistentId
|
||||
|
||||
Reference in New Issue
Block a user