diff options
| author | 2015-01-06 19:49:25 +0000 | |
|---|---|---|
| committer | 2015-01-15 21:21:26 +0000 | |
| commit | 85030c6e6bfe83b6671de45b25535fe3ef713319 (patch) | |
| tree | 03a9735f1c306c4679359b64b29013a9d350bfde /src/core/loader/3dsx.cpp | |
| parent | Loader: Don’t duplicate the docstring into the cpp file. (diff) | |
| download | yuzu-85030c6e6bfe83b6671de45b25535fe3ef713319.tar.gz yuzu-85030c6e6bfe83b6671de45b25535fe3ef713319.tar.xz yuzu-85030c6e6bfe83b6671de45b25535fe3ef713319.zip | |
Loader: Never forget to change is_loaded.
Diffstat (limited to 'src/core/loader/3dsx.cpp')
| -rw-r--r-- | src/core/loader/3dsx.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/loader/3dsx.cpp b/src/core/loader/3dsx.cpp index 06827668f..15032e0ae 100644 --- a/src/core/loader/3dsx.cpp +++ b/src/core/loader/3dsx.cpp | |||
| @@ -215,13 +215,20 @@ AppLoader_THREEDSX::~AppLoader_THREEDSX() { | |||
| 215 | 215 | ||
| 216 | ResultStatus AppLoader_THREEDSX::Load() { | 216 | ResultStatus AppLoader_THREEDSX::Load() { |
| 217 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); | 217 | LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str()); |
| 218 | |||
| 219 | if (is_loaded) | ||
| 220 | return ResultStatus::ErrorAlreadyLoaded; | ||
| 221 | |||
| 218 | FileUtil::IOFile file(filename, "rb"); | 222 | FileUtil::IOFile file(filename, "rb"); |
| 223 | |||
| 219 | if (file.IsOpen()) { | 224 | if (file.IsOpen()) { |
| 220 | THREEDSXReader::Load3DSXFile(filename, 0x00100000); | 225 | THREEDSXReader::Load3DSXFile(filename, 0x00100000); |
| 221 | Kernel::LoadExec(0x00100000); | 226 | Kernel::LoadExec(0x00100000); |
| 222 | } else { | 227 | } else { |
| 223 | return ResultStatus::Error; | 228 | return ResultStatus::Error; |
| 224 | } | 229 | } |
| 230 | |||
| 231 | is_loaded = true; | ||
| 225 | return ResultStatus::Success; | 232 | return ResultStatus::Success; |
| 226 | } | 233 | } |
| 227 | 234 | ||