From 9563f968c8713626041b17975c44f51ab33f3381 Mon Sep 17 00:00:00 2001 From: mrbesen Date: Mon, 14 Jun 2021 12:22:36 +0200 Subject: [PATCH] ignore version missmatch --- include/beatsaber/beatsaber.h | 2 ++ src/beatlevel.cpp | 4 +++- src/beatsaber.cpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/include/beatsaber/beatsaber.h b/include/beatsaber/beatsaber.h index 29dd63f..9c216cd 100644 --- a/include/beatsaber/beatsaber.h +++ b/include/beatsaber/beatsaber.h @@ -7,6 +7,8 @@ namespace Beatsaber { +extern bool ignoreVersionMissmatch; + const uint32_t STEAMGAMEID = 620980; std::string findBeatsaberInstallation(); diff --git a/src/beatlevel.cpp b/src/beatlevel.cpp index 5421e27..4f77a1b 100644 --- a/src/beatlevel.cpp +++ b/src/beatlevel.cpp @@ -3,6 +3,7 @@ #include #include +#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; } } diff --git a/src/beatsaber.cpp b/src/beatsaber.cpp index f28c937..922fb75 100644 --- a/src/beatsaber.cpp +++ b/src/beatsaber.cpp @@ -13,6 +13,8 @@ namespace Beatsaber { +bool ignoreVersionMissmatch = false; + #if __unix__ static std::string getSteamDefault() { //get the user process