finding beatsaber installation
This commit is contained in:
parent
bd2c91e39a
commit
4dcfcee3dd
|
@ -43,7 +43,7 @@ std::string findBeatsaberInstallation() {
|
|||
if(!line.empty() && line[0] == '\t') {
|
||||
int num;
|
||||
char pathbuffer[512];
|
||||
int res = sscanf(line.c_str(), "\t\"%d\" \t\"%s\"", &num, pathbuffer);
|
||||
int res = sscanf(line.c_str(), "\t\"%d\" \t\"%[^\"]512s", &num, pathbuffer);
|
||||
if(res == 2) {
|
||||
std::string path(pathbuffer);
|
||||
paths.push_back(path + "/steamapps/");
|
||||
|
@ -52,11 +52,13 @@ std::string findBeatsaberInstallation() {
|
|||
}
|
||||
libinfo.close();
|
||||
|
||||
std::cout << paths.size() << " steam libs found" << std::endl;
|
||||
//std::cout << paths.size() << " steam libs found" << std::endl;
|
||||
|
||||
//search in libs for beatsaber
|
||||
for(const std::string& it : paths) {
|
||||
std::ifstream appmanifest(it + "appmanifest_" + std::to_string(STEAMGAMEID) + ".acf");
|
||||
const std::string appmani = it + "appmanifest_" + std::to_string(STEAMGAMEID) + ".acf";
|
||||
//std::cout << "Try to read file: " << appmani << std::endl;
|
||||
std::ifstream appmanifest(appmani);
|
||||
if(appmanifest.is_open()) {
|
||||
//found it!
|
||||
//do stuff with the manifest???
|
||||
|
|
Loading…
Reference in New Issue