mirror of
https://github.com/switchbrew/switch-tools.git
synced 2025-07-03 10:32:14 +02:00
Merge pull request #2 from devkitPro/sciresm-fixes
fix romfsdir output & windows build
This commit is contained in:
commit
0fe4070bfa
@ -258,8 +258,9 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
} else if (romfs_dir_path) {
|
} else if (romfs_dir_path) {
|
||||||
asset_hdr.romfs.offset = tmp_off;
|
asset_hdr.romfs.offset = tmp_off;
|
||||||
asset_hdr.romfs.size = build_romfs_by_path_into_file(romfs_dir_path, out, tmp_off);
|
asset_hdr.romfs.size = build_romfs_by_path_into_file(romfs_dir_path, out, file_off + tmp_off);
|
||||||
tmp_off+= asset_hdr.romfs.size;
|
tmp_off+= asset_hdr.romfs.size;
|
||||||
|
fseek(out, file_off, SEEK_SET);
|
||||||
}
|
}
|
||||||
|
|
||||||
fwrite(&asset_hdr, sizeof(asset_hdr), 1, out);
|
fwrite(&asset_hdr, sizeof(asset_hdr), 1, out);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
#include <wchar.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define __USE_LARGEFILE64
|
#define __USE_LARGEFILE64
|
||||||
@ -43,7 +44,7 @@ typedef struct _stati64 os_stat64_t;
|
|||||||
#define os_opendir _wopendir
|
#define os_opendir _wopendir
|
||||||
#define os_readdir _wreaddir
|
#define os_readdir _wreaddir
|
||||||
#define os_stat _wstati64
|
#define os_stat _wstati64
|
||||||
#define os_fclose _wfclose
|
#define os_fclose fclose
|
||||||
|
|
||||||
#define OS_MODE_READ L"rb"
|
#define OS_MODE_READ L"rb"
|
||||||
#define OS_MODE_WRITE L"wb"
|
#define OS_MODE_WRITE L"wb"
|
||||||
|
Loading…
Reference in New Issue
Block a user