Add sdmc path support to FileSystem

This commit is contained in:
Thomas Edvalson
2016-03-20 10:16:58 -04:00
parent a5833c6101
commit d2f90cb06e
2 changed files with 9 additions and 2 deletions
+1
View File
@@ -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>
+8 -2
View File
@@ -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