mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 13:27:45 -07:00
Core: Add a Maker field for GameModDescriptors.
This commit is contained in:
parent
85d2ea0dd2
commit
2906889804
@ -135,6 +135,10 @@ std::optional<GameModDescriptor> ParseGameModDescriptorString(std::string_view j
|
|||||||
{
|
{
|
||||||
descriptor.display_name = value.get<std::string>();
|
descriptor.display_name = value.get<std::string>();
|
||||||
}
|
}
|
||||||
|
else if (key == "maker" && value.is<std::string>())
|
||||||
|
{
|
||||||
|
descriptor.maker = value.get<std::string>();
|
||||||
|
}
|
||||||
else if (key == "banner" && value.is<std::string>())
|
else if (key == "banner" && value.is<std::string>())
|
||||||
{
|
{
|
||||||
descriptor.banner = MakeAbsolute(json_directory, value.get<std::string>());
|
descriptor.banner = MakeAbsolute(json_directory, value.get<std::string>());
|
||||||
@ -195,6 +199,8 @@ std::string WriteGameModDescriptorString(const GameModDescriptor& descriptor, bo
|
|||||||
json_root["base-file"] = picojson::value(descriptor.base_file);
|
json_root["base-file"] = picojson::value(descriptor.base_file);
|
||||||
if (!descriptor.display_name.empty())
|
if (!descriptor.display_name.empty())
|
||||||
json_root["display-name"] = picojson::value(descriptor.display_name);
|
json_root["display-name"] = picojson::value(descriptor.display_name);
|
||||||
|
if (!descriptor.maker.empty())
|
||||||
|
json_root["maker"] = picojson::value(descriptor.maker);
|
||||||
if (!descriptor.banner.empty())
|
if (!descriptor.banner.empty())
|
||||||
json_root["banner"] = picojson::value(descriptor.banner);
|
json_root["banner"] = picojson::value(descriptor.banner);
|
||||||
if (descriptor.riivolution)
|
if (descriptor.riivolution)
|
||||||
|
@ -36,6 +36,7 @@ struct GameModDescriptor
|
|||||||
{
|
{
|
||||||
std::string base_file;
|
std::string base_file;
|
||||||
std::string display_name;
|
std::string display_name;
|
||||||
|
std::string maker;
|
||||||
std::string banner;
|
std::string banner;
|
||||||
std::optional<GameModDescriptorRiivolution> riivolution = std::nullopt;
|
std::optional<GameModDescriptorRiivolution> riivolution = std::nullopt;
|
||||||
};
|
};
|
||||||
|
@ -177,6 +177,8 @@ GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
|||||||
m_valid = true;
|
m_valid = true;
|
||||||
m_file_size = File::GetSize(m_file_path);
|
m_file_size = File::GetSize(m_file_path);
|
||||||
m_long_names.emplace(DiscIO::Language::English, std::move(descriptor->display_name));
|
m_long_names.emplace(DiscIO::Language::English, std::move(descriptor->display_name));
|
||||||
|
if (!descriptor->maker.empty())
|
||||||
|
m_long_makers.emplace(DiscIO::Language::English, std::move(descriptor->maker));
|
||||||
m_internal_name = proxy.GetInternalName();
|
m_internal_name = proxy.GetInternalName();
|
||||||
m_game_id = proxy.GetGameID();
|
m_game_id = proxy.GetGameID();
|
||||||
m_gametdb_id = proxy.GetGameTDBID();
|
m_gametdb_id = proxy.GetGameTDBID();
|
||||||
|
@ -17,6 +17,9 @@
|
|||||||
"display-name": {
|
"display-name": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"maker": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"banner": {
|
"banner": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user