Loader: Never forget to change is_loaded.

This commit is contained in:
Emmanuel Gil Peyrot 2015-01-06 19:49:25 +00:00
parent 43e699d849
commit 85030c6e6b
6 changed files with 15 additions and 7 deletions

View file

@ -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;
}