summaryrefslogtreecommitdiffstats
path: root/src/core/loader/3dsx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/loader/3dsx.cpp')
-rw-r--r--src/core/loader/3dsx.cpp7
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() {
ResultStatus AppLoader_THREEDSX::Load() {
LOG_INFO(Loader, "Loading 3DSX file %s...", filename.c_str());
+
+ if (is_loaded)
+ return ResultStatus::ErrorAlreadyLoaded;
+
FileUtil::IOFile file(filename, "rb");
+
if (file.IsOpen()) {
THREEDSXReader::Load3DSXFile(filename, 0x00100000);
Kernel::LoadExec(0x00100000);
} else {
return ResultStatus::Error;
}
+
+ is_loaded = true;
return ResultStatus::Success;
}