mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-31 22:00:05 +00:00
citra_android: Storage Access Framework implementation (#6313)
This commit is contained in:
parent
8c12eb4905
commit
8d563d37b4
68 changed files with 1972 additions and 545 deletions
|
|
@ -336,6 +336,15 @@ public:
|
|||
[[nodiscard]] bool IsGood() const {
|
||||
return m_good;
|
||||
}
|
||||
[[nodiscard]] int GetFd() const {
|
||||
#ifdef ANDROID
|
||||
return m_fd;
|
||||
#else
|
||||
if (m_file == nullptr)
|
||||
return -1;
|
||||
return fileno(m_file);
|
||||
#endif
|
||||
}
|
||||
[[nodiscard]] explicit operator bool() const {
|
||||
return IsGood();
|
||||
}
|
||||
|
|
@ -359,6 +368,7 @@ private:
|
|||
bool Open();
|
||||
|
||||
std::FILE* m_file = nullptr;
|
||||
int m_fd = -1;
|
||||
bool m_good = true;
|
||||
|
||||
std::string filename;
|
||||
|
|
@ -383,6 +393,8 @@ private:
|
|||
friend class boost::serialization::access;
|
||||
};
|
||||
|
||||
template <std::ios_base::openmode o, typename T>
|
||||
void OpenFStream(T& fstream, const std::string& filename);
|
||||
} // namespace FileUtil
|
||||
|
||||
// To deal with Windows being dumb at unicode:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue