Formatting

This commit is contained in:
Maschell 2021-09-28 20:04:55 +02:00
parent a18a28091b
commit bff0f823f0
4 changed files with 53 additions and 53 deletions

View File

@ -137,8 +137,8 @@ void freeDirHandle(uint32_t handle) {
FSStatus FSOpenDirWrapper(char *path, FSStatus FSOpenDirWrapper(char *path,
FSDirectoryHandle *handle, FSDirectoryHandle *handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
return FS_STATUS_USE_REAL_OS; return FS_STATUS_USE_REAL_OS;
@ -201,7 +201,7 @@ FSStatus FSOpenDirWrapper(char *path,
FSStatus FSReadDirWrapper(FSDirectoryHandle handle, FSStatus FSReadDirWrapper(FSDirectoryHandle handle,
FSDirectoryEntry *entry, FSDirectoryEntry *entry,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
@ -253,7 +253,7 @@ FSStatus FSReadDirWrapper(FSDirectoryHandle handle,
FSStatus FSCloseDirWrapper(FSDirectoryHandle handle, FSStatus FSCloseDirWrapper(FSDirectoryHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidDirHandle(handle)) { !isValidDirHandle(handle)) {
@ -281,7 +281,7 @@ FSStatus FSCloseDirWrapper(FSDirectoryHandle handle,
FSStatus FSRewindDirWrapper(FSDirectoryHandle handle, FSStatus FSRewindDirWrapper(FSDirectoryHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidDirHandle(handle)) { !isValidDirHandle(handle)) {
@ -303,8 +303,8 @@ FSStatus FSRewindDirWrapper(FSDirectoryHandle handle,
FSStatus FSMakeDirWrapper(char *path, FSStatus FSMakeDirWrapper(char *path,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
@ -334,8 +334,8 @@ FSStatus FSOpenFileWrapper(char *path,
const char *mode, const char *mode,
FSFileHandle *handle, FSFileHandle *handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
return FS_STATUS_USE_REAL_OS; return FS_STATUS_USE_REAL_OS;
@ -424,7 +424,7 @@ FSStatus FSOpenFileWrapper(char *path,
FSStatus FSCloseFileWrapper(FSFileHandle handle, FSStatus FSCloseFileWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -456,8 +456,8 @@ FSStatus FSCloseFileWrapper(FSFileHandle handle,
} }
FSStatus FSGetStatWrapper(char *path, FSStat *stats, FSErrorFlag errorMask, FSStatus FSGetStatWrapper(char *path, FSStat *stats, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
return FS_STATUS_USE_REAL_OS; return FS_STATUS_USE_REAL_OS;
@ -531,7 +531,7 @@ static inline void replaceContentPath(char *pathForCheck, int pathForCheckSize,
FSStatus FSGetStatFileWrapper(FSFileHandle handle, FSStatus FSGetStatFileWrapper(FSFileHandle handle,
FSStat *stats, FSStat *stats,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -574,7 +574,7 @@ FSStatus FSReadFileWrapper(void *buffer,
FSFileHandle handle, FSFileHandle handle,
uint32_t unk1, uint32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -621,7 +621,7 @@ FSStatus FSReadFileWithPosWrapper(void *buffer,
FSFileHandle handle, FSFileHandle handle,
int32_t unk1, int32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -648,7 +648,7 @@ FSStatus FSReadFileWithPosWrapper(void *buffer,
FSStatus FSSetPosFileWrapper(FSFileHandle handle, FSStatus FSSetPosFileWrapper(FSFileHandle handle,
uint32_t pos, uint32_t pos,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -680,7 +680,7 @@ FSStatus FSSetPosFileWrapper(FSFileHandle handle,
FSStatus FSGetPosFileWrapper(FSFileHandle handle, FSStatus FSGetPosFileWrapper(FSFileHandle handle,
uint32_t *pos, uint32_t *pos,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -713,7 +713,7 @@ FSStatus FSGetPosFileWrapper(FSFileHandle handle,
FSStatus FSIsEofWrapper(FSFileHandle handle, FSStatus FSIsEofWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
!isValidFileHandle(handle)) { !isValidFileHandle(handle)) {
@ -749,7 +749,7 @@ FSStatus FSIsEofWrapper(FSFileHandle handle,
FSStatus FSTruncateFileWrapper(FSFileHandle handle, FSStatus FSTruncateFileWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
@ -775,7 +775,7 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer,
FSFileHandle handle, FSFileHandle handle,
uint32_t unk1, uint32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted) ||
@ -791,8 +791,8 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer,
FSStatus FSRemoveWrapper(char *path, FSStatus FSRemoveWrapper(char *path,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
@ -822,8 +822,8 @@ FSStatus FSRemoveWrapper(char *path,
FSStatus FSRenameWrapper(char *oldPath, FSStatus FSRenameWrapper(char *oldPath,
char *newPath, char *newPath,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *, char *)>& fallback_function, const std::function<FSStatus(char *, char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler) { const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {
@ -852,7 +852,7 @@ FSStatus FSRenameWrapper(char *oldPath,
return result_handler(result); return result_handler(result);
} }
FSStatus FSFlushFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, const std::function<FSStatus(FSStatus)>& result_handler) { FSStatus FSFlushFileWrapper(FSFileHandle handle, FSErrorFlag errorMask, const std::function<FSStatus(FSStatus)> &result_handler) {
if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) || if ((gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_NONE) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) || (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_PATH) ||
(gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) { (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE && !gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted)) {

View File

@ -37,48 +37,48 @@ extern fileMagic_t file_handles[FILE_HANDLES_LENGTH];
FSStatus FSOpenDirWrapper(char *path, FSStatus FSOpenDirWrapper(char *path,
FSDirectoryHandle *handle, FSDirectoryHandle *handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSReadDirWrapper(FSDirectoryHandle handle, FSStatus FSReadDirWrapper(FSDirectoryHandle handle,
FSDirectoryEntry *entry, FSDirectoryEntry *entry,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSCloseDirWrapper(FSDirectoryHandle handle, FSStatus FSCloseDirWrapper(FSDirectoryHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSRewindDirWrapper(FSDirectoryHandle handle, FSStatus FSRewindDirWrapper(FSDirectoryHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSMakeDirWrapper(char *path, FSStatus FSMakeDirWrapper(char *path,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSOpenFileWrapper(char *path, FSStatus FSOpenFileWrapper(char *path,
const char *mode, const char *mode,
FSFileHandle *handle, FSFileHandle *handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSCloseFileWrapper(FSFileHandle handle, FSStatus FSCloseFileWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSGetStatWrapper(char *path, FSStatus FSGetStatWrapper(char *path,
FSStat *stats, FSStat *stats,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSGetStatFileWrapper(FSFileHandle handle, FSStatus FSGetStatFileWrapper(FSFileHandle handle,
FSStat *stats, FSStat *stats,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSReadFileWrapper(void *buffer, FSStatus FSReadFileWrapper(void *buffer,
uint32_t size, uint32_t size,
@ -86,7 +86,7 @@ FSStatus FSReadFileWrapper(void *buffer,
FSFileHandle handle, FSFileHandle handle,
uint32_t unk1, uint32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSReadFileWithPosWrapper(void *buffer, FSStatus FSReadFileWithPosWrapper(void *buffer,
uint32_t size, uint32_t size,
@ -95,25 +95,25 @@ FSStatus FSReadFileWithPosWrapper(void *buffer,
FSFileHandle handle, FSFileHandle handle,
int32_t unk1, int32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSSetPosFileWrapper(FSFileHandle handle, FSStatus FSSetPosFileWrapper(FSFileHandle handle,
uint32_t pos, uint32_t pos,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSGetPosFileWrapper(FSFileHandle handle, FSStatus FSGetPosFileWrapper(FSFileHandle handle,
uint32_t *pos, uint32_t *pos,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSIsEofWrapper(FSFileHandle handle, FSStatus FSIsEofWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSTruncateFileWrapper(FSFileHandle handle, FSStatus FSTruncateFileWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSWriteFileWrapper(uint8_t *buffer, FSStatus FSWriteFileWrapper(uint8_t *buffer,
uint32_t size, uint32_t size,
@ -121,22 +121,22 @@ FSStatus FSWriteFileWrapper(uint8_t *buffer,
FSFileHandle handle, FSFileHandle handle,
uint32_t unk1, uint32_t unk1,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSRemoveWrapper(char *path, FSStatus FSRemoveWrapper(char *path,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *)>& fallback_function, const std::function<FSStatus(char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSRenameWrapper(char *oldPath, FSStatus FSRenameWrapper(char *oldPath,
char *newPath, char *newPath,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(char *, char *)>& fallback_function, const std::function<FSStatus(char *, char *)> &fallback_function,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
FSStatus FSFlushFileWrapper(FSFileHandle handle, FSStatus FSFlushFileWrapper(FSFileHandle handle,
FSErrorFlag errorMask, FSErrorFlag errorMask,
const std::function<FSStatus(FSStatus)>& result_handler); const std::function<FSStatus(FSStatus)> &result_handler);
int32_t getNewDirHandleIndex(); int32_t getNewDirHandleIndex();

View File

@ -245,8 +245,8 @@ int32_t RL_UnmountBundle(const char *name) {
return romfsUnmount(name); return romfsUnmount(name);
} }
bool RL_UnmountCurrentRunningBundle(){ bool RL_UnmountCurrentRunningBundle() {
if(gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted == false){ if (gReplacementInfo.contentReplacementInfo.bundleMountInformation.isMounted == false) {
return true; return true;
} }
if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE) { if (gReplacementInfo.contentReplacementInfo.mode == CONTENTREDIRECT_FROM_WUHB_BUNDLE) {

View File

@ -1,7 +1,7 @@
#include "FileReaderCompressed.h" #include "FileReaderCompressed.h"
int FileReaderCompressed::read(uint8_t *buffer, uint32_t size) { int FileReaderCompressed::read(uint8_t *buffer, uint32_t size) {
if(!initDone){ if (!initDone) {
return -11; return -11;
} }
int startValue = this->strm.total_out; int startValue = this->strm.total_out;