summaryrefslogtreecommitdiffstats
path: root/src/core/loader/3dsx.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-01-06 22:30:40 +0100
committerEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2015-01-15 22:21:26 +0100
commitb5237e885df72f6c37532fc8af9573966e7b07e5 (patch)
treefdfd4da299cc2779f35fcc30e770b85b9e710166 /src/core/loader/3dsx.cpp
parentLoader: Initialize the default NCCH values in the class declaration, not in the constructor. (diff)
downloadyuzu-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.cpp21
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;