ignore version missmatch

This commit is contained in:
mrbesen 2021-06-14 12:22:36 +02:00
parent 9340eb92f4
commit 9563f968c8
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
3 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,8 @@
namespace Beatsaber {
extern bool ignoreVersionMissmatch;
const uint32_t STEAMGAMEID = 620980;
std::string findBeatsaberInstallation();

View File

@ -3,6 +3,7 @@
#include <iostream>
#include <nlohmann/json.hpp>
#include "beatsaber.h"
#include "beatset.h"
#include "beatnoteimpl.h"
#include "beatmap.h" // for debug print
@ -28,10 +29,11 @@ bool BeatLevelImpl::load() {
json diffjson;
(*stream) >> diffjson;
if(diffjson.contains("_version") && diffjson["_version"].is_string()) {
if(!ignoreVersionMissmatch && diffjson.contains("_version") && diffjson["_version"].is_string()) {
const std::string& version = diffjson["_version"];
if(version != "2.0.0") {
//not supported
std::cout << "version not supported: " << version << std::endl;
return false;
}
}

View File

@ -13,6 +13,8 @@
namespace Beatsaber {
bool ignoreVersionMissmatch = false;
#if __unix__
static std::string getSteamDefault() {
//get the user process