Read Linux steam icons

This commit is contained in:
Guillaume Meunier
2025-08-09 15:02:28 +02:00
parent d5ef8c1a85
commit 45d5d6dd7a
5 changed files with 72 additions and 5 deletions
+3 -3
View File
@@ -84,7 +84,7 @@ steam_app_info read_steam_app_info(const std::filesystem::path & root)
return {};
}
std::filesystem::path find_steam_icon(const std::filesystem::path & root, int app_id, const steam_app_info & info)
std::optional<std::filesystem::path> find_steam_icon(const std::filesystem::path & root, int app_id, const steam_app_info & info)
{
const auto & app_info = info.get(app_id);
@@ -102,7 +102,7 @@ std::filesystem::path find_steam_icon(const std::filesystem::path & root, int ap
try
{
std::string icon{std::get<std::string_view>(app_info.at("common.LinuxClientIcon"))};
std::string icon{std::get<std::string_view>(app_info.at("common.linuxclienticon"))};
auto icon_path = root / "steam/games" / (icon + ".zip");
@@ -113,7 +113,7 @@ std::filesystem::path find_steam_icon(const std::filesystem::path & root, int ap
{
}
return {};
return std::nullopt;
}
void read_steam_vr_apps(std::unordered_map<std::string, application> & res)