Fix for brackets in title

This commit is contained in:
WarmUpTill 2016-07-09 23:41:00 +02:00 committed by GitHub
parent c88b283f3d
commit 243a41d740

View File

@ -23,7 +23,15 @@ void Switcher::switcherThreadFunc() {
bool match = false;
string name = "";
bool checkFullscreen = false;
for (std::map<string, Data>::iterator iter = settingsMap.begin(); iter != settingsMap.end(); ++iter)
//first check if there is a direct match
map<string, Data>::iterator it = settingsMap.find(windowname);
if (it != settingsMap.end()) {
name = it->second.sceneName;
checkFullscreen = it->second.isFullscreen;
match = true;
}
else {
for (map<string, Data>::iterator iter = settingsMap.begin(); iter != settingsMap.end(); ++iter)
{
try
{
@ -35,11 +43,12 @@ void Switcher::switcherThreadFunc() {
break;
}
}
catch(...)
catch (...)
{
}
}
}
//do we only switch if window is also fullscreen?
if (!checkFullscreen || (checkFullscreen && isWindowFullscreen())) {
//do we know the window title or is a fullscreen/backup Scene set?
@ -76,7 +85,7 @@ void Switcher::switcherThreadFunc() {
}
}
//sleep for a bit
this_thread::sleep_for(std::chrono::milliseconds(1000));
this_thread::sleep_for(chrono::milliseconds(1000));
}
}