mirror of
https://github.com/Lime3DS/Lime3DS
synced 2024-12-28 10:02:31 -06:00
c8c2beaeff
* do not move constant variables
* applet_manager: avoid possible use after move
* use constant references where pointed out by msvc
* extra_hid: initialize response
* ValidateSaveState: passing slot separately is not necessary
* common: mark HashCombine as nodiscard
* cityhash: remove use of using namespace std
* Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
based on 7d8f115
* shared_memory.cpp: fix log error format
* fix compiling with pch off
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
// 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);
|
|
}
|
|
|
|
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;
|
|
|
|
private:
|
|
std::string filename;
|
|
std::string filepath;
|
|
};
|
|
|
|
} // namespace Loader
|