mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-04-27 16:47:01 -05:00
Fix for brackets in title
This commit is contained in:
parent
c88b283f3d
commit
243a41d740
15
switcher.cpp
15
switcher.cpp
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user