diff options
Diffstat (limited to 'backends/platform/3ds/osystem.cpp')
-rw-r--r-- | backends/platform/3ds/osystem.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/backends/platform/3ds/osystem.cpp b/backends/platform/3ds/osystem.cpp index c42e208b40..0e5cb7bfbb 100644 --- a/backends/platform/3ds/osystem.cpp +++ b/backends/platform/3ds/osystem.cpp @@ -36,8 +36,8 @@ #include "common/str.h" #include "config.h" -#include "backends/fs/posix/posix-fs-factory.h" -#include "backends/fs/posix/posix-fs.h" +#include "backends/fs/posix-drives/posix-drives-fs-factory.h" +#include "backends/fs/posix-drives/posix-drives-fs.h" #include <unistd.h> #include <time.h> @@ -77,8 +77,13 @@ OSystem_3DS::OSystem_3DS(): sleeping(false) { chdir("sdmc:/"); - _fsFactory = new POSIXFilesystemFactory(); - Posix::assureDirectoryExists("/3ds/scummvm/saves/"); + + DrivesPOSIXFilesystemFactory *fsFactory = new DrivesPOSIXFilesystemFactory(); + fsFactory->addDrive("sdmc:"); + fsFactory->addDrive("romfs:"); + _fsFactory = fsFactory; + + Posix::assureDirectoryExists("sdmc:/3ds/scummvm/saves/"); } OSystem_3DS::~OSystem_3DS() { @@ -101,15 +106,11 @@ void OSystem_3DS::initBackend() { ConfMan.registerDefault("aspect_ratio", true); if (!ConfMan.hasKey("vkeybd_pack_name")) ConfMan.set("vkeybd_pack_name", "vkeybd_small"); - if (!ConfMan.hasKey("vkeybdpath")) - ConfMan.set("vkeybdpath", "/3ds/scummvm/kb"); - if (!ConfMan.hasKey("themepath")) - ConfMan.set("themepath", "/3ds/scummvm"); if (!ConfMan.hasKey("gui_theme")) ConfMan.set("gui_theme", "builtin"); _timerManager = new DefaultTimerManager(); - _savefileManager = new DefaultSaveFileManager("/3ds/scummvm/saves/"); + _savefileManager = new DefaultSaveFileManager("sdmc:/3ds/scummvm/saves/"); initGraphics(); initAudio(); @@ -125,7 +126,11 @@ void OSystem_3DS::updateConfig() { } Common::String OSystem_3DS::getDefaultConfigFileName() { - return "/3ds/scummvm/scummvm.ini"; + return "sdmc:/3ds/scummvm/scummvm.ini"; +} + +void OSystem_3DS::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { + s.add("RomFS", new Common::FSDirectory("romfs:/"), priority); } uint32 OSystem_3DS::getMillis(bool skipRecord) { |