Loader, Frontends: Refactor loader creation and game loading

This allows frontends to keep a single loader and use it multiple times
e.g. for code loading and SMDH parsing.
This commit is contained in:
Emmanuel Gil Peyrot 2016-05-17 23:06:33 +01:00
parent 51ee2d2eb1
commit 8fc9c03126
6 changed files with 37 additions and 49 deletions

View file

@ -207,10 +207,10 @@ extern const std::initializer_list<Kernel::AddressMapping> default_address_mappi
std::unique_ptr<AppLoader> GetLoader(FileUtil::IOFile&& file, FileType type, const std::string& filename, const std::string& filepath);
/**
* Identifies and loads a bootable file
* Identifies a bootable file and return a suitable loader
* @param filename String filename of bootable file
* @return ResultStatus result of function
* @return best loader for this file
*/
ResultStatus LoadFile(const std::string& filename);
std::unique_ptr<AppLoader> GetFileLoader(const std::string& filename);
} // namespace