Don't rely on steamapps.vrmanifest
The file seems to no longer be updated by Steam. Instead, read installed games from libraryfolders.vdf, owned games from user's localconfig.vdf and data from appinfo.vdf
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "vdf.h"
|
||||
|
||||
#include <boost/iostreams/device/mapped_file.hpp>
|
||||
#include <format>
|
||||
#include <iostream>
|
||||
|
||||
namespace
|
||||
@@ -132,6 +133,16 @@ bool wivrn::vdf::string::operator==(const char * b) const
|
||||
return *b == '\0';
|
||||
}
|
||||
|
||||
wivrn::vdf::keyvalue const & wivrn::vdf::keyvalue::operator[](const char * key) const
|
||||
{
|
||||
for (auto const & kv: std::get<std::vector<keyvalue>>(value))
|
||||
{
|
||||
if (kv.key == key)
|
||||
return kv;
|
||||
}
|
||||
throw std::out_of_range{std::format("no key {}", key)};
|
||||
}
|
||||
|
||||
wivrn::vdf::root::root(const std::filesystem::path & file)
|
||||
{
|
||||
boost::iostreams::mapped_file in{file};
|
||||
|
||||
Reference in New Issue
Block a user