diff options
| author | 2015-01-06 21:30:40 +0000 | |
|---|---|---|
| committer | 2015-01-15 21:21:26 +0000 | |
| commit | b5237e885df72f6c37532fc8af9573966e7b07e5 (patch) | |
| tree | fdfd4da299cc2779f35fcc30e770b85b9e710166 /src/core/loader/ncch.h | |
| parent | Loader: Initialize the default NCCH values in the class declaration, not in t... (diff) | |
| download | yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.gz yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.tar.xz yuzu-b5237e885df72f6c37532fc8af9573966e7b07e5.zip | |
Loader: Keep a reference to the file and pass it to the correct AppLoader, instead of loading it multiple times.
Diffstat (limited to 'src/core/loader/ncch.h')
| -rw-r--r-- | src/core/loader/ncch.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/core/loader/ncch.h b/src/core/loader/ncch.h index 578513f77..d9d68f154 100644 --- a/src/core/loader/ncch.h +++ b/src/core/loader/ncch.h | |||
| @@ -5,7 +5,6 @@ | |||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include "common/common.h" | 7 | #include "common/common.h" |
| 8 | #include "common/file_util.h" | ||
| 9 | 8 | ||
| 10 | #include "core/loader/loader.h" | 9 | #include "core/loader/loader.h" |
| 11 | 10 | ||
| @@ -147,8 +146,7 @@ namespace Loader { | |||
| 147 | /// Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) | 146 | /// Loads an NCCH file (e.g. from a CCI, or the first NCCH in a CXI) |
| 148 | class AppLoader_NCCH final : public AppLoader { | 147 | class AppLoader_NCCH final : public AppLoader { |
| 149 | public: | 148 | public: |
| 150 | AppLoader_NCCH(const std::string& filename); | 149 | AppLoader_NCCH(std::unique_ptr<FileUtil::IOFile>&& file) : AppLoader(std::move(file)) { } |
| 151 | ~AppLoader_NCCH() override; | ||
| 152 | 150 | ||
| 153 | /** | 151 | /** |
| 154 | * Load the application | 152 | * Load the application |
| @@ -213,9 +211,6 @@ private: | |||
| 213 | */ | 211 | */ |
| 214 | ResultStatus LoadExec() const; | 212 | ResultStatus LoadExec() const; |
| 215 | 213 | ||
| 216 | std::string filename; | ||
| 217 | |||
| 218 | bool is_loaded = false; | ||
| 219 | bool is_compressed = false; | 214 | bool is_compressed = false; |
| 220 | 215 | ||
| 221 | u32 entry_point = 0; | 216 | u32 entry_point = 0; |