Regex support for Ignore windows

This commit is contained in:
WarmUpTill 2017-10-29 14:10:30 +01:00 committed by GitHub
parent 53aa828c9e
commit 25540aee2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -235,10 +235,17 @@ void SwitcherData::checkWindowTitleSwitch(bool& match, OBSWeakSource& scene, OBS
GetCurrentWindowTitle(title);
for (auto& window : ignoreWindowsSwitches)
{
if (window == title)
try
{
bool matches = regex_match(title, regex(window));
if (matches)
{
title = lastTitle;
break;
}
}
catch (const regex_error&)
{
title = lastTitle;
break;
}
}
lastTitle = title;