diff options
author | Franco M <francomaro@gmail.com> | 2023-11-05 01:28:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-05 01:28:16 +0100 |
commit | 728aca770317b3f86961c8669ba9ae5c68570d3f (patch) | |
tree | 29adffcb1d264cc16cacb478a8f6645ef6259b3b /src/common/string_util.cpp | |
parent | We dont need that (diff) | |
parent | Merge pull request #11952 from liamwhite/opus_stereo_count (diff) | |
download | yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar.gz yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar.bz2 yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar.lz yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar.xz yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.tar.zst yuzu-728aca770317b3f86961c8669ba9ae5c68570d3f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/string_util.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 4c7aba3f5..72c481798 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -14,6 +14,10 @@ #include <windows.h> #endif +#ifdef ANDROID +#include <common/fs/fs_android.h> +#endif + namespace Common { /// Make a string lowercase @@ -63,6 +67,14 @@ bool SplitPath(const std::string& full_path, std::string* _pPath, std::string* _ if (full_path.empty()) return false; +#ifdef ANDROID + if (full_path[0] != '/') { + *_pPath = Common::FS::Android::GetParentDirectory(full_path); + *_pFilename = Common::FS::Android::GetFilename(full_path); + return true; + } +#endif + std::size_t dir_end = full_path.find_last_of("/" // windows needs the : included for something like just "C:" to be considered a directory #ifdef _WIN32 |