mirror of
https://github.com/Atmosphere-NX/Atmosphere-libs.git
synced 2025-06-24 20:22:39 +02:00
compat fixes for libnx master
This commit is contained in:
parent
b5fc48fc75
commit
fd45f890fa
@ -38,7 +38,7 @@ namespace ams::fs {
|
||||
}
|
||||
|
||||
virtual Result GetSizeImpl(s64 *out) override final {
|
||||
return fsFileGetSize(this->base_file.get(), reinterpret_cast<u64 *>(out));
|
||||
return fsFileGetSize(this->base_file.get(), out);
|
||||
}
|
||||
|
||||
virtual Result FlushImpl() override final {
|
||||
@ -72,11 +72,11 @@ namespace ams::fs {
|
||||
virtual ~RemoteDirectory() { fsDirClose(this->base_dir.get()); }
|
||||
public:
|
||||
virtual Result ReadImpl(s64 *out_count, DirectoryEntry *out_entries, s64 max_entries) override final {
|
||||
return fsDirRead(this->base_dir.get(), 0, reinterpret_cast<u64 *>(out_count), max_entries, out_entries);
|
||||
return fsDirRead(this->base_dir.get(), out_count, max_entries, out_entries);
|
||||
}
|
||||
|
||||
virtual Result GetEntryCountImpl(s64 *out) override final {
|
||||
return fsDirGetEntryCount(this->base_dir.get(), reinterpret_cast<u64 *>(out));
|
||||
return fsDirGetEntryCount(this->base_dir.get(), out);
|
||||
}
|
||||
};
|
||||
|
||||
@ -147,11 +147,11 @@ namespace ams::fs {
|
||||
|
||||
|
||||
virtual Result GetFreeSpaceSizeImpl(s64 *out, const char *path) {
|
||||
return fsFsGetFreeSpace(this->base_fs.get(), path, reinterpret_cast<u64 *>(out));
|
||||
return fsFsGetFreeSpace(this->base_fs.get(), path, out);
|
||||
}
|
||||
|
||||
virtual Result GetTotalSpaceSizeImpl(s64 *out, const char *path) {
|
||||
return fsFsGetTotalSpace(this->base_fs.get(), path, reinterpret_cast<u64 *>(out));
|
||||
return fsFsGetTotalSpace(this->base_fs.get(), path, out);
|
||||
}
|
||||
|
||||
virtual Result CleanDirectoryRecursivelyImpl(const char *path) {
|
||||
@ -163,8 +163,8 @@ namespace ams::fs {
|
||||
return fsFsGetFileTimeStampRaw(this->base_fs.get(), path, reinterpret_cast<::FsTimeStampRaw *>(out));
|
||||
}
|
||||
|
||||
virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, fsa::QueryType query, const char *path) {
|
||||
return fsFsQueryEntry(this->base_fs.get(), dst, dst_size, src, src_size, path, static_cast<FsFileSystemQueryType>(query));
|
||||
virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, fsa::QueryId query, const char *path) {
|
||||
return fsFsQueryEntry(this->base_fs.get(), dst, dst_size, src, src_size, path, static_cast<FsFileSystemQueryId>(query));
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -44,7 +44,7 @@ namespace ams::fs {
|
||||
};
|
||||
|
||||
virtual Result GetSize(s64 *out_size) override {
|
||||
return fsStorageGetSize(this->base_storage.get(), reinterpret_cast<u64 *>(out_size));
|
||||
return fsStorageGetSize(this->base_storage.get(), out_size);
|
||||
};
|
||||
|
||||
virtual Result SetSize(s64 size) override {
|
||||
|
@ -23,8 +23,8 @@ namespace ams::fs::fsa {
|
||||
class IFile;
|
||||
class IDirectory;
|
||||
|
||||
enum class QueryType {
|
||||
SetArchiveBit = FsFileSystemQueryType_SetArchiveBit
|
||||
enum class QueryId {
|
||||
SetConcatenationFileAttribute = FsFileSystemQueryId_SetConcatenationFileAttribute
|
||||
};
|
||||
|
||||
class IFileSystem {
|
||||
@ -122,7 +122,7 @@ namespace ams::fs::fsa {
|
||||
return this->GetFileTimeStampRawImpl(out, path);
|
||||
}
|
||||
|
||||
Result QueryEntry(char *dst, size_t dst_size, const char *src, size_t src_size, QueryType query, const char *path) {
|
||||
Result QueryEntry(char *dst, size_t dst_size, const char *src, size_t src_size, QueryId query, const char *path) {
|
||||
R_UNLESS(path != nullptr, fs::ResultInvalidPath());
|
||||
return this->QueryEntryImpl(dst, dst_size, src, src_size, query, path);
|
||||
}
|
||||
@ -170,7 +170,7 @@ namespace ams::fs::fsa {
|
||||
return fs::ResultNotImplemented();
|
||||
}
|
||||
|
||||
virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, QueryType query, const char *path) {
|
||||
virtual Result QueryEntryImpl(char *dst, size_t dst_size, const char *src, size_t src_size, QueryId query, const char *path) {
|
||||
return fs::ResultNotImplemented();
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ namespace ams::util::ini {
|
||||
size_t num_left;
|
||||
|
||||
explicit FsFileContext(FsFile *f) : f(f), offset(0) {
|
||||
u64 size;
|
||||
s64 size;
|
||||
R_ASSERT(fsFileGetSize(this->f, &size));
|
||||
this->num_left = size_t(size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user