Change wording slightly

This commit is contained in:
Myned 2020-05-21 00:52:41 -04:00
parent 463b54f1fb
commit f00c244bfa
No known key found for this signature in database
GPG Key ID: 24318A323F309244
5 changed files with 14 additions and 14 deletions

View File

@ -154,9 +154,9 @@ void SwitcherData::checkExeSwitch(bool& match, OBSWeakSource& scene, OBSWeakSour
bool equals = runningProcesses.contains(s.mExe);
// True if executable switch is running (regex)
bool matches = (runningProcesses.indexOf(QRegularExpression(s.mExe)) != -1);
// True if focus is disabled OR window in focus
// True if focus is disabled OR switch is focused
bool focus = (!s.mInFocus || isInFocus(s.mExe));
// True if current window is ignored AND executable switch matches last window
// True if current window is ignored AND switch matches last window
bool ignore = (ignored && QString::fromStdString(title).contains(QRegularExpression(s.mExe)));
if ((equals || matches) && (focus || ignore))

View File

@ -152,7 +152,7 @@ int secondsSinceLastInput();
* Executable helper
********************************************************************************/
void GetProcessList(QStringList &processes);
bool isInFocus(const QString &exeToCheck);
bool isInFocus(const QString &executable);
/********************************************************************************
* Sceneswitch helper

View File

@ -46,7 +46,7 @@ static inline QString MakeSwitchNameExecutable(const QString &scene,
transition + QStringLiteral("]: ") + value;
return QStringLiteral("[") + scene + QStringLiteral(", ") + transition +
QStringLiteral("]: ") + value +
QStringLiteral(" (only if window is focused)");
QStringLiteral(" (only if focused)");
}
static inline QString MakeScreenRegionSwitchName(const QString &scene,

View File

@ -341,15 +341,15 @@ void GetProcessList(QStringList &processes)
}
}
bool isInFocus(const QString &exeToCheck)
bool isInFocus(const QString &executable)
{
string curWindow;
GetCurrentWindowTitle(curWindow);
string current;
GetCurrentWindowTitle(current);
// True if executable switch equals current window
bool equals = (exeToCheck.toStdString() == curWindow);
bool equals = (executable.toStdString() == current);
// True if executable switch matches current window
bool matches = QString::fromStdString(curWindow).contains(QRegularExpression(exeToCheck));
bool matches = QString::fromStdString(current).contains(QRegularExpression(executable));
return (equals || matches);
}

View File

@ -126,15 +126,15 @@ void GetProcessList(QStringList& list)
}
}
bool isInFocus(const QString &exeToCheck)
bool isInFocus(const QString &executable)
{
string curWindow;
GetCurrentWindowTitle(curWindow);
string current;
GetCurrentWindowTitle(current);
// True if executable switch equals current window
bool equals = (exeToCheck.toStdString() == curWindow);
bool equals = (executable.toStdString() == current);
// True if executable switch matches current window
bool matches = QString::fromStdString(curWindow).contains(QRegularExpression(exeToCheck));
bool matches = QString::fromStdString(current).contains(QRegularExpression(executable));
return (equals || matches);
}