Created
October 20, 2019 22:06
-
-
Save knight-ryu12/eb2b8e786d445f2b92017b70e856dc9a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Result FSHelp_FormatExtdata(uint64_t id, FS_MediaType media, uint32_t directories, uint32_t files, uint64_t sizeLimit, uint32_t smdhSize, uint8_t* smdh) { | |
FS_ExtSaveDataInfo esdi; | |
memset(&esdi, 0, sizeof(esdi)); | |
esdi.saveId = id; | |
esdi.mediaType = media; | |
if ((!smdhSize || !smdh) && !GetSMDH()) { | |
// special case just for citra with a 3dsx | |
Result res = FSUSER_CreateExtSaveData(esdi, directories, files, sizeLimit, 0, NULL); | |
if (R_SUCCEEDED(res)) | |
return res; | |
return MAKERESULT(RL_FATAL, RS_NOTFOUND, RM_APPLICATION, RD_NOT_FOUND); | |
} | |
if (!smdhSize || !smdh) { | |
smdh = smdh_data; | |
smdhSize = smdh_size; | |
} | |
return FSUSER_CreateExtSaveData(esdi, directories, files, sizeLimit, smdh_size, smdh_data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment