mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-04 02:22:15 +02:00
Merge branch 'master' of https://github.com/switchbrew/libnx into dev
This commit is contained in:
commit
2bbcfffc3c
@ -21,6 +21,12 @@ typedef enum {
|
||||
SwkbdType_Normal = 0, ///< Normal keyboard.
|
||||
SwkbdType_NumPad = 1, ///< Number pad. The buttons at the bottom left/right are only available when they're set by \ref swkbdConfigSetLeftOptionalSymbolKey / \ref swkbdConfigSetRightOptionalSymbolKey.
|
||||
SwkbdType_QWERTY = 2, ///< QWERTY (and variants) keyboard only.
|
||||
SwkbdType_Unknown3 = 3, ///< The same as SwkbdType_Normal keyboard.
|
||||
SwkbdType_Latin = 4, ///< All Latin like languages keyboard only (without CJK keyboard).
|
||||
SwkbdType_ZhHans = 5, ///< Chinese Simplified keyboard only.
|
||||
SwkbdType_ZhHant = 6, ///< Chinese Traditional keyboard only.
|
||||
SwkbdType_Korean = 7, ///< Korean keyboard only.
|
||||
SwkbdType_All = 8, ///< All language keyboards.
|
||||
} SwkbdType;
|
||||
|
||||
/// Bitmask for SwkbdArgCommon::keySetDisableBitmask. This disables keys on the keyboard when the corresponding bit(s) are set.
|
||||
|
@ -33,6 +33,9 @@ Result fsdevMountSdmc(void);
|
||||
/// Mounts the specified save data.
|
||||
Result fsdevMountSaveData(const char *name, u64 application_id, AccountUid uid);
|
||||
|
||||
/// Mounts the specified DeviceSaveData.
|
||||
Result fsdevMountDeviceSaveData(const char *name, u64 application_id);
|
||||
|
||||
/// Mounts the specified system save data.
|
||||
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid);
|
||||
|
||||
|
@ -367,10 +367,14 @@ Result fsGetGlobalAccessLogMode(u32* out_mode);
|
||||
Result fsCreate_SystemSaveDataWithOwner(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid, u64 owner_id, s64 size, s64 journal_size, u32 flags);
|
||||
Result fsCreate_SystemSaveData(FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, s64 size, s64 journal_size, u32 flags);
|
||||
|
||||
/// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||
/// See FsSave for program_id and uid.
|
||||
/// Wrapper for fsOpenSaveDataFileSystem.
|
||||
/// See \ref FsSaveDataAttribute for application_id and uid.
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 application_id, AccountUid uid);
|
||||
|
||||
/// Wrapper for fsOpenSaveDataFileSystem, for opening DeviceSaveData.
|
||||
/// See \ref FsSaveDataAttribute for application_id.
|
||||
Result fsOpen_DeviceSaveData(FsFileSystem* out, u64 application_id);
|
||||
|
||||
/// Wrapper for fsOpenSaveDataFileSystemBySystemSaveDataId.
|
||||
/// WARNING: You can brick when writing to SystemSaveData, if the data is corrupted etc.
|
||||
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid);
|
||||
|
@ -465,6 +465,19 @@ Result fsdevMountSaveData(const char *name, u64 application_id, AccountUid uid)
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result fsdevMountDeviceSaveData(const char *name, u64 application_id)
|
||||
{
|
||||
FsFileSystem fs;
|
||||
Result rc = fsOpen_DeviceSaveData(&fs, application_id);
|
||||
if(R_SUCCEEDED(rc))
|
||||
{
|
||||
int ret = fsdevMountDevice(name, fs);
|
||||
if(ret==-1)
|
||||
rc = MAKERESULT(Module_Libnx, LibnxError_OutOfMemory);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result fsdevMountSystemSaveData(const char *name, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid)
|
||||
{
|
||||
FsFileSystem fs;
|
||||
|
@ -483,6 +483,10 @@ Result fsCreate_SystemSaveData(FsSaveDataSpaceId save_data_space_id, u64 system_
|
||||
}
|
||||
|
||||
// Wrapper(s) for fsOpenSaveDataFileSystem.
|
||||
static Result _fsOpen_SaveDataFs(FsFileSystem* out, FsSaveDataAttribute *attr) {
|
||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_User, attr);
|
||||
}
|
||||
|
||||
Result fsOpen_SaveData(FsFileSystem* out, u64 application_id, AccountUid uid) {
|
||||
FsSaveDataAttribute attr;
|
||||
|
||||
@ -491,7 +495,17 @@ Result fsOpen_SaveData(FsFileSystem* out, u64 application_id, AccountUid uid) {
|
||||
attr.uid = uid;
|
||||
attr.save_data_type = FsSaveDataType_Account;
|
||||
|
||||
return fsOpenSaveDataFileSystem(out, FsSaveDataSpaceId_User, &attr);
|
||||
return _fsOpen_SaveDataFs(out, &attr);
|
||||
}
|
||||
|
||||
Result fsOpen_DeviceSaveData(FsFileSystem* out, u64 application_id) {
|
||||
FsSaveDataAttribute attr;
|
||||
|
||||
memset(&attr, 0, sizeof(attr));
|
||||
attr.application_id = application_id;
|
||||
attr.save_data_type = FsSaveDataType_Device;
|
||||
|
||||
return _fsOpen_SaveDataFs(out, &attr);
|
||||
}
|
||||
|
||||
Result fsOpen_SystemSaveData(FsFileSystem* out, FsSaveDataSpaceId save_data_space_id, u64 system_save_data_id, AccountUid uid) {
|
||||
|
Loading…
Reference in New Issue
Block a user