diff options
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-01-06 22:30:40 +0100 |
---|---|---|
committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2015-01-15 22:21:26 +0100 |
commit | b5237e885df72f6c37532fc8af9573966e7b07e5 (patch) | |
tree | fdfd4da299cc2779f35fcc30e770b85b9e710166 /src/core/loader/3dsx.cpp | |
parent | Loader: Initialize the default NCCH values in the class declaration, not in the constructor. (diff) | |
download | yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.gz yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.bz2 yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.lz yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.xz yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.zst yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.zip |
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) return ERROR_NONE; } -/// AppLoader_DSX constructor -AppLoader_THREEDSX::AppLoader_THREEDSX(const std::string& filename) : filename(filename) { -} - -/// AppLoader_DSX destructor -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()) { - Load3DSXFile(file, 0x00100000); - Kernel::LoadExec(0x00100000); - } else { + if (!file->IsOpen()) return ResultStatus::Error; - } + + Load3DSXFile(*file, 0x00100000); + Kernel::LoadExec(0x00100000); is_loaded = true; return ResultStatus::Success; |