mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 18:30:05 +00:00
loader: Add support for reading the name of game's developer
This commit is contained in:
parent
51483d83bb
commit
5f0217592b
@ -12,6 +12,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "common/common_types.h"
|
#include "common/common_types.h"
|
||||||
|
#include "core/file_sys/control_metadata.h"
|
||||||
#include "core/file_sys/vfs.h"
|
#include "core/file_sys/vfs.h"
|
||||||
|
|
||||||
namespace Kernel {
|
namespace Kernel {
|
||||||
@ -243,6 +244,15 @@ public:
|
|||||||
return ResultStatus::ErrorNotImplemented;
|
return ResultStatus::ErrorNotImplemented;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the developer of the application
|
||||||
|
* @param developer Reference to store the application developer into
|
||||||
|
* @return ResultStatus result of function
|
||||||
|
*/
|
||||||
|
virtual ResultStatus ReadDeveloper(std::string& developer) {
|
||||||
|
return ResultStatus::ErrorNotImplemented;
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
FileSys::VirtualFile file;
|
FileSys::VirtualFile file;
|
||||||
bool is_loaded = false;
|
bool is_loaded = false;
|
||||||
|
@ -151,4 +151,11 @@ ResultStatus AppLoader_NSP::ReadTitle(std::string& title) {
|
|||||||
title = nacp_file->GetApplicationName();
|
title = nacp_file->GetApplicationName();
|
||||||
return ResultStatus::Success;
|
return ResultStatus::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResultStatus AppLoader_NSP::ReadDeveloper(std::string& developer) {
|
||||||
|
if (nacp_file == nullptr)
|
||||||
|
return ResultStatus::ErrorNoControl;
|
||||||
|
developer = nacp_file->GetDeveloperName();
|
||||||
|
return ResultStatus::Success;
|
||||||
|
}
|
||||||
} // namespace Loader
|
} // namespace Loader
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
ResultStatus ReadProgramId(u64& out_program_id) override;
|
ResultStatus ReadProgramId(u64& out_program_id) override;
|
||||||
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
|
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
|
||||||
ResultStatus ReadTitle(std::string& title) override;
|
ResultStatus ReadTitle(std::string& title) override;
|
||||||
|
ResultStatus ReadDeveloper(std::string& developer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<FileSys::NSP> nsp;
|
std::unique_ptr<FileSys::NSP> nsp;
|
||||||
|
@ -120,4 +120,11 @@ ResultStatus AppLoader_XCI::ReadTitle(std::string& title) {
|
|||||||
title = nacp_file->GetApplicationName();
|
title = nacp_file->GetApplicationName();
|
||||||
return ResultStatus::Success;
|
return ResultStatus::Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ResultStatus AppLoader_XCI::ReadDeveloper(std::string& developer) {
|
||||||
|
if (nacp_file == nullptr)
|
||||||
|
return ResultStatus::ErrorNoControl;
|
||||||
|
developer = nacp_file->GetDeveloperName();
|
||||||
|
return ResultStatus::Success;
|
||||||
|
}
|
||||||
} // namespace Loader
|
} // namespace Loader
|
||||||
|
@ -43,6 +43,7 @@ public:
|
|||||||
ResultStatus ReadProgramId(u64& out_program_id) override;
|
ResultStatus ReadProgramId(u64& out_program_id) override;
|
||||||
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
|
ResultStatus ReadIcon(std::vector<u8>& buffer) override;
|
||||||
ResultStatus ReadTitle(std::string& title) override;
|
ResultStatus ReadTitle(std::string& title) override;
|
||||||
|
ResultStatus ReadDeveloper(std::string& developer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<FileSys::XCI> xci;
|
std::unique_ptr<FileSys::XCI> xci;
|
||||||
|
Loading…
Reference in New Issue
Block a user