diff options
Diffstat (limited to 'src/core/core.cpp')
| -rw-r--r-- | src/core/core.cpp | 8 |
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 @@ | |||
| 8 | #include <thread> | 8 | #include <thread> |
| 9 | #include <utility> | 9 | #include <utility> |
| 10 | 10 | ||
| 11 | #include "common/file_util.h" | ||
| 11 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 12 | #include "common/string_util.h" | 13 | #include "common/string_util.h" |
| 13 | #include "core/arm/exclusive_monitor.h" | 14 | #include "core/arm/exclusive_monitor.h" |
| @@ -40,7 +41,6 @@ namespace Core { | |||
| 40 | 41 | ||
| 41 | /*static*/ System System::s_instance; | 42 | /*static*/ System System::s_instance; |
| 42 | 43 | ||
| 43 | namespace { | ||
| 44 | FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | 44 | FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, |
| 45 | const std::string& path) { | 45 | const std::string& path) { |
| 46 | // To account for split 00+01+etc files. | 46 | // To account for split 00+01+etc files. |
| @@ -69,11 +69,13 @@ FileSys::VirtualFile GetGameFileFromPath(const FileSys::VirtualFilesystem& vfs, | |||
| 69 | return FileSys::ConcatenatedVfsFile::MakeConcatenatedFile(concat, dir->GetName()); | 69 | return FileSys::ConcatenatedVfsFile::MakeConcatenatedFile(concat, dir->GetName()); |
| 70 | } | 70 | } |
| 71 | 71 | ||
| 72 | if (FileUtil::IsDirectory(path)) | ||
| 73 | return vfs->OpenFile(path + "/" + "main", FileSys::Mode::Read); | ||
| 74 | |||
| 72 | return vfs->OpenFile(path, FileSys::Mode::Read); | 75 | return vfs->OpenFile(path, FileSys::Mode::Read); |
| 73 | } | 76 | } |
| 74 | } // Anonymous namespace | ||
| 75 | |||
| 76 | struct System::Impl { | 77 | struct System::Impl { |
| 78 | |||
| 77 | Cpu& CurrentCpuCore() { | 79 | Cpu& CurrentCpuCore() { |
| 78 | return cpu_core_manager.GetCurrentCore(); | 80 | return cpu_core_manager.GetCurrentCore(); |
| 79 | } | 81 | } |