ignore version missmatch
This commit is contained in:
parent
9340eb92f4
commit
9563f968c8
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
namespace Beatsaber {
|
namespace Beatsaber {
|
||||||
|
|
||||||
|
extern bool ignoreVersionMissmatch;
|
||||||
|
|
||||||
const uint32_t STEAMGAMEID = 620980;
|
const uint32_t STEAMGAMEID = 620980;
|
||||||
std::string findBeatsaberInstallation();
|
std::string findBeatsaberInstallation();
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
|
#include "beatsaber.h"
|
||||||
#include "beatset.h"
|
#include "beatset.h"
|
||||||
#include "beatnoteimpl.h"
|
#include "beatnoteimpl.h"
|
||||||
#include "beatmap.h" // for debug print
|
#include "beatmap.h" // for debug print
|
||||||
|
@ -28,10 +29,11 @@ bool BeatLevelImpl::load() {
|
||||||
json diffjson;
|
json diffjson;
|
||||||
(*stream) >> 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"];
|
const std::string& version = diffjson["_version"];
|
||||||
if(version != "2.0.0") {
|
if(version != "2.0.0") {
|
||||||
//not supported
|
//not supported
|
||||||
|
std::cout << "version not supported: " << version << std::endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
namespace Beatsaber {
|
namespace Beatsaber {
|
||||||
|
|
||||||
|
bool ignoreVersionMissmatch = false;
|
||||||
|
|
||||||
#if __unix__
|
#if __unix__
|
||||||
static std::string getSteamDefault() {
|
static std::string getSteamDefault() {
|
||||||
//get the user process
|
//get the user process
|
||||||
|
|
Loading…
Reference in New Issue