diff options
Diffstat (limited to 'src/core/loader/loader.cpp')
| -rw-r--r-- | src/core/loader/loader.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/core/loader/loader.cpp b/src/core/loader/loader.cpp index 9719d30d5..147bf8591 100644 --- a/src/core/loader/loader.cpp +++ b/src/core/loader/loader.cpp | |||
| @@ -4,10 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | #include <string> | 6 | #include <string> |
| 7 | |||
| 8 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 9 | #include "common/string_util.h" | 8 | #include "common/string_util.h" |
| 10 | |||
| 11 | #include "core/hle/kernel/process.h" | 9 | #include "core/hle/kernel/process.h" |
| 12 | #include "core/loader/3dsx.h" | 10 | #include "core/loader/3dsx.h" |
| 13 | #include "core/loader/elf.h" | 11 | #include "core/loader/elf.h" |
| @@ -18,17 +16,17 @@ | |||
| 18 | namespace Loader { | 16 | namespace Loader { |
| 19 | 17 | ||
| 20 | const std::initializer_list<Kernel::AddressMapping> default_address_mappings = { | 18 | const std::initializer_list<Kernel::AddressMapping> default_address_mappings = { |
| 21 | { 0x1FF50000, 0x8000, true }, // part of DSP RAM | 19 | {0x1FF50000, 0x8000, true}, // part of DSP RAM |
| 22 | { 0x1FF70000, 0x8000, true }, // part of DSP RAM | 20 | {0x1FF70000, 0x8000, true}, // part of DSP RAM |
| 23 | { 0x1F000000, 0x600000, false }, // entire VRAM | 21 | {0x1F000000, 0x600000, false}, // entire VRAM |
| 24 | }; | 22 | }; |
| 25 | 23 | ||
| 26 | FileType IdentifyFile(FileUtil::IOFile& file) { | 24 | FileType IdentifyFile(FileUtil::IOFile& file) { |
| 27 | FileType type; | 25 | FileType type; |
| 28 | 26 | ||
| 29 | #define CHECK_TYPE(loader) \ | 27 | #define CHECK_TYPE(loader) \ |
| 30 | type = AppLoader_##loader::IdentifyType(file); \ | 28 | type = AppLoader_##loader::IdentifyType(file); \ |
| 31 | if (FileType::Error != type) \ | 29 | if (FileType::Error != type) \ |
| 32 | return type; | 30 | return type; |
| 33 | 31 | ||
| 34 | CHECK_TYPE(THREEDSX) | 32 | CHECK_TYPE(THREEDSX) |
| @@ -100,7 +98,8 @@ const char* GetFileTypeString(FileType type) { | |||
| 100 | * @return std::unique_ptr<AppLoader> a pointer to a loader object; nullptr for unsupported type | 98 | * @return std::unique_ptr<AppLoader> a pointer to a loader object; nullptr for unsupported type |
| 101 | */ | 99 | */ |
| 102 | static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileType type, | 100 | static std::unique_ptr<AppLoader> GetFileLoader(FileUtil::IOFile&& file, FileType type, |
| 103 | const std::string& filename, const std::string& filepath) { | 101 | const std::string& filename, |
| 102 | const std::string& filepath) { | ||
| 104 | switch (type) { | 103 | switch (type) { |
| 105 | 104 | ||
| 106 | // 3DSX file format. | 105 | // 3DSX file format. |