diff options
Diffstat (limited to 'src/core/loader/3dsx.cpp')
| -rw-r--r-- | src/core/loader/3dsx.cpp | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 54ee992fc..873ee8b25 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -199,28 +199,15 @@ static THREEDSX_Error Load3DSXFile(FileUtil::IOFile& file, u32 base_addr) | |||
| 199 | return ERROR_NONE; | 199 | return ERROR_NONE; |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | /// AppLoader_DSX constructor | ||
| 203 | AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) { | ||
| 204 | } | ||
| 205 | |||
| 206 | /// AppLoader_DSX destructor | ||
| 207 | AppLoader_THREEDSX::~AppLoader_THREEDSX() { | ||
| 208 | } | ||
| 209 | |||
| 210 | ResultStatus AppLoader_THREEDSX::Load() { | 202 | ResultStatus AppLoader_THREEDSX::Load() { |
| 211 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); | ||
| 212 | |||
| 213 | if (is_loaded) | 203 | if (is_loaded) |
| 214 | return ResultStatus::ErrorAlreadyLoaded; | 204 | return ResultStatus::ErrorAlreadyLoaded; |
| 215 | 205 | ||
| 216 | FileUtil::IOFile file(filename, "rb"); | 206 | if (!file->IsOpen()) |
| 217 | |||
| 218 | if (file.IsOpen()) { | ||
| 219 | Load3DSXFile(file, 0x00100000); | ||
| 220 | Kernel::LoadExec(0x00100000); | ||
| 221 | } else { | ||
| 222 | return ResultStatus::Error; | 207 | return ResultStatus::Error; |
| 223 | } | 208 | |
| 209 | Load3DSXFile(*file, 0x00100000); | ||
| 210 | Kernel::LoadExec(0x00100000); | ||
| 224 | 211 | ||
| 225 | is_loaded = true; | 212 | is_loaded = true; |
| 226 | return ResultStatus::Success; | 213 | return ResultStatus::Success; |