Compare commits

...

4 Commits

Author SHA1 Message Date
kdlz4161
ab18af8f26 Merge fe038816ef into b3298465cf 2018-04-01 17:13:25 +00:00
kdlz4161
fe038816ef Update xci.h 2018-04-01 14:13:23 -03:00
kdlz4161
f28de1c3c4 Update xci.h 2018-04-01 14:12:41 -03:00
kdlz4161
1ab81d3bd8 Create xci.h
Add support of xci files
2018-04-01 14:09:45 -03:00

40
src/core/loader/xci.h Normal file
View File

@@ -0,0 +1,40 @@
// Copyright 2018 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#pragma once
#include <string>
#include "common/common_types.h"
#include "core/hle/kernel/kernel.h"
#include "core/loader/linker.h"
#include "core/loader/loader.h"
namespace Loader {
/// Loads an XCI file
class AppLoader_XCI final : public AppLoader, Linker {
public:
AppLoader_XCI(FileUtil::IOFile&& file, std::string filepath);
/**
* Returns the type of the file
* @param file FileUtil::IOFile open file
* @param filepath Path of the file that we are opening.
* @return FileType found, or FileType::Error if this loader doesn't know it
*/
static FileType IdentifyType(FileUtil::IOFile& file, const std::string& filepath);
FileType GetFileType() override {
return IdentifyType(file, filepath);
}
ResultStatus Load(Kernel::SharedPtr<Kernel::Process>& process) override;
private:
bool LoadXci(const std::string& path, VAddr load_base);
std::string filepath;
};
} // namespace Loader