mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Change wording slightly
This commit is contained in:
parent
463b54f1fb
commit
f00c244bfa
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ int secondsSinceLastInput();
|
|||
* Executable helper
|
||||
********************************************************************************/
|
||||
void GetProcessList(QStringList &processes);
|
||||
bool isInFocus(const QString &exeToCheck);
|
||||
bool isInFocus(const QString &executable);
|
||||
|
||||
/********************************************************************************
|
||||
* Sceneswitch helper
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user