Add setPreconditions()

The idea is to avoid repeated calls to the same functions which lead to
the same outcome, but just calling them once in the precondition checks.

For now move repeated calls of GetCurrentWindowTitle() and ignoreWindow
checks to this function.
This commit is contained in:
WarmUpTill
2021-06-18 20:09:40 +02:00
committed by WarmUpTill
parent decee4647b
commit bdd9d12257
7 changed files with 33 additions and 50 deletions

View File

@@ -98,6 +98,7 @@ struct SwitcherData {
std::deque<WindowSwitch> windowSwitches;
std::vector<std::string> ignoreIdleWindows;
std::string lastTitle;
std::string currentTitle;
std::deque<ScreenRegionSwitch> screenRegionSwitches;
@@ -202,6 +203,7 @@ struct SwitcherData {
void writeSceneInfoToFile();
void writeToStatusFile(const QString &msg);
void setPreconditions();
bool checkForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
int &linger, bool &setPreviousSceneAsMatch,
bool &macroMatch);