mirror of
https://github.com/encounter/cpp3ds.git
synced 2026-03-30 11:04:22 -07:00
Add sdmc path support to FileSystem
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include <cpp3ds/System/Clock.hpp>
|
||||
#include <cpp3ds/System/Err.hpp>
|
||||
#include <cpp3ds/System/FileSystem.hpp>
|
||||
#include <cpp3ds/System/I18n.hpp>
|
||||
#include <cpp3ds/System/InputStream.hpp>
|
||||
#include <cpp3ds/System/Lock.hpp>
|
||||
|
||||
@@ -7,9 +7,15 @@ namespace cpp3ds {
|
||||
const std::string FileSystem::getFilePath(const std::string& filename)
|
||||
{
|
||||
#ifdef EMULATION
|
||||
if (filename.find("../res/romfs/") == 0)
|
||||
return filename;
|
||||
std::string newpath;
|
||||
if (filename.find("../res/romfs/") == 0) {
|
||||
return filename;
|
||||
}
|
||||
if (filename.find("sdmc:/") == 0) {
|
||||
newpath = filename;
|
||||
newpath.erase(0, 5);
|
||||
return "../res/sdmc" + newpath;
|
||||
}
|
||||
newpath = "../res/romfs/" + filename;
|
||||
return newpath;
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user