mirror of
https://github.com/switchbrew/libnx.git
synced 2025-09-25 06:23:20 +02:00
fs: add fsOpenGameCardDetectionEventNotifier and fsOpenGameCardStorage.
This commit is contained in:
parent
f6e45096aa
commit
47e445e088
@ -261,6 +261,11 @@ typedef enum {
|
||||
FsGameCardPartition_Logo = 3, ///< [4.0.0+]
|
||||
} FsGameCardPartition;
|
||||
|
||||
typedef enum {
|
||||
FsGameCardStoragePartition_Normal = 0,
|
||||
FsGameCardStoragePartition_Secure = 1,
|
||||
} FsGameCardStoragePartition;
|
||||
|
||||
typedef struct {
|
||||
u32 value;
|
||||
} FsGameCardHandle;
|
||||
@ -540,8 +545,11 @@ Result fsOpenDataStorageByProgramId(FsStorage *out, u64 program_id); /// <[3.0.0
|
||||
Result fsOpenDataStorageByDataId(FsStorage* out, u64 dataId, NcmStorageId storageId);
|
||||
Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out);
|
||||
|
||||
Result fsOpenGameCardStorage(FsStorage* out, const FsGameCardHandle* handle, FsGameCardStoragePartition partition);
|
||||
|
||||
Result fsOpenDeviceOperator(FsDeviceOperator* out);
|
||||
Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out);
|
||||
Result fsOpenGameCardDetectionEventNotifier(FsEventNotifier* out);
|
||||
|
||||
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out);
|
||||
|
||||
|
@ -538,6 +538,18 @@ Result fsOpenPatchDataStorageByCurrentProcess(FsStorage* out) {
|
||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 203);
|
||||
}
|
||||
|
||||
Result fsOpenGameCardStorage(FsStorage* out, const FsGameCardHandle* handle, FsGameCardStoragePartition partition) {
|
||||
const struct {
|
||||
FsGameCardHandle handle;
|
||||
u32 partition;
|
||||
} in = { *handle, (u32)partition };
|
||||
|
||||
return serviceDispatchIn(&g_fsSrv, 30, in,
|
||||
.out_num_objects = 1,
|
||||
.out_objects = &out->s
|
||||
);
|
||||
}
|
||||
|
||||
Result fsOpenDeviceOperator(FsDeviceOperator* out) {
|
||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 400);
|
||||
}
|
||||
@ -546,6 +558,10 @@ Result fsOpenSdCardDetectionEventNotifier(FsEventNotifier* out) {
|
||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 500);
|
||||
}
|
||||
|
||||
Result fsOpenGameCardDetectionEventNotifier(FsEventNotifier* out) {
|
||||
return _fsCmdGetSession(&g_fsSrv, &out->s, 501);
|
||||
}
|
||||
|
||||
Result fsIsSignedSystemPartitionOnSdCardValid(bool *out) {
|
||||
if (!hosversionBetween(4, 8))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
Loading…
Reference in New Issue
Block a user