summaryrefslogtreecommitdiffstats
path: root/src/core/core.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-28 20:00:44 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-03 23:20:34 +0100
commitc7b41ade74f55bd910414f20bbcc62a68101d768 (patch)
tree2f6a79d4136f4d9e9864c9feecb1b722c515fa5a /src/core/core.cpp
parentconfig: Store and load disabled add-ons list (diff)
downloadyuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar.gz
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar.bz2
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar.lz
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar.xz
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.tar.zst
yuzu-c7b41ade74f55bd910414f20bbcc62a68101d768.zip
Diffstat (limited to 'src/core/core.cpp')
-rw-r--r--src/core/core.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 795fabc65..ce7851538 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -8,6 +8,7 @@
#include <thread>
#include <utility>
+#include "common/file_util.h"
#include "common/logging/log.h"
#include "common/string_util.h"
#include "core/arm/exclusive_monitor.h"
@@ -40,7 +41,6 @@ namespace Core {
/*static*/ System System::s_instance;
-namespace {
FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
const std::string& path) {
// To account for split 00+01+etc files.
@@ -69,11 +69,13 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs,
return FileSys::ConcatenatedVfsFile::MakeConcatenatedFile(concat, dir->GetName());
}
+ if (FileUtil::IsDirectory(path))
+ return vfs->OpenFile(path + "/" + "main", FileSys::Mode::Read);
+
return vfs->OpenFile(path, FileSys::Mode::Read);
}
-} // Anonymous namespace
-
struct System::Impl {
+
Cpu& CurrentCpuCore() {
return cpu_core_manager.GetCurrentCore();
}