mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
small bug fix for reading settings
This commit is contained in:
parent
810c36f71e
commit
c88b283f3d
|
|
@ -26,21 +26,22 @@ void Settings::load() {
|
|||
ifstream infile(settingsFilePath);
|
||||
string value;
|
||||
string line;
|
||||
size_t pos = string::npos;
|
||||
size_t pos;
|
||||
int numValues;
|
||||
bool startMessageDisableFound = false;
|
||||
infile.seekg(0);
|
||||
while (infile.good())
|
||||
{
|
||||
pos = line.npos;
|
||||
numValues = 0;
|
||||
//read json file
|
||||
getline(infile, line);
|
||||
//disable the start message?
|
||||
if (!startMessageDisableFound) {
|
||||
pos = line.find("\"StartMessageDisable\": ");
|
||||
if (pos != string::npos) {
|
||||
if (pos != line.npos) {
|
||||
startMessageDisableFound = true;
|
||||
startMessageDisable = line.find("true") == string::npos ? false : true;
|
||||
startMessageDisable = line.find("true") == line.npos ? false : true;
|
||||
}
|
||||
}
|
||||
//get switcher info
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user