mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2026-06-03 05:35:01 -06:00
Some checks are pending
citra-build / source (push) Waiting to run
citra-build / linux (appimage) (push) Waiting to run
citra-build / linux (fresh) (push) Waiting to run
citra-build / macos (arm64) (push) Waiting to run
citra-build / macos (x86_64) (push) Waiting to run
citra-build / macos-universal (push) Blocked by required conditions
citra-build / windows (msvc) (push) Waiting to run
citra-build / windows (msys2) (push) Waiting to run
citra-build / android (push) Waiting to run
citra-build / ios (push) Waiting to run
citra-format / clang-format (push) Waiting to run
citra-transifex / transifex (push) Waiting to run
52 lines
1.5 KiB
C++
52 lines
1.5 KiB
C++
// Copyright Citra Emulator Project / Azahar Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
// Copyright 2014 Dolphin Emulator Project / Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
#include "common/common_types.h"
|
|
#include "core/loader/loader.h"
|
|
|
|
namespace Loader {
|
|
|
|
/// Loads an 3DSX file
|
|
class AppLoader_THREEDSX final : public AppLoader {
|
|
public:
|
|
AppLoader_THREEDSX(Core::System& system_, FileUtil::IOFile&& file, const std::string& filename,
|
|
const std::string& filepath)
|
|
: AppLoader(system_, std::move(file)), filename(filename), filepath(filepath) {}
|
|
|
|
/**
|
|
* Returns the type of the file
|
|
* @param file FileUtil::IOFile open file
|
|
* @return FileType found, or FileType::Error if this loader doesn't know it
|
|
*/
|
|
static FileType IdentifyType(FileUtil::IOFile* file);
|
|
|
|
FileType GetFileType() override {
|
|
return IdentifyType(file.get());
|
|
}
|
|
|
|
ResultStatus Load(std::shared_ptr<Kernel::Process>& process) override;
|
|
|
|
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
|
|
|
|
ResultStatus ReadRomFS(std::shared_ptr<FileSys::RomFSReader>& romfs_file) override;
|
|
|
|
CompressFileInfo GetCompressFileInfo() override;
|
|
|
|
bool IsFileCompressed() override;
|
|
|
|
private:
|
|
std::string filename;
|
|
std::string filepath;
|
|
};
|
|
|
|
} // namespace Loader
|