mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-27 19:56:07 -05:00
SwitcherData style changes
This commit is contained in:
@@ -127,7 +127,7 @@ static void SaveSceneSwitcher(obs_data_t *save_data, bool saving, void *)
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switcher->Prune();
|
||||
obs_data_t *obj = obs_data_create();
|
||||
switcher->saveSettings(obj);
|
||||
switcher->SaveSettings(obj);
|
||||
obs_data_set_obj(save_data, "advanced-scene-switcher", obj);
|
||||
obs_data_release(obj);
|
||||
} else {
|
||||
@@ -141,10 +141,10 @@ static void SaveSceneSwitcher(obs_data_t *save_data, bool saving, void *)
|
||||
if (!obj) {
|
||||
obj = obs_data_create();
|
||||
}
|
||||
if (switcher->versionChanged(obj, g_GIT_SHA1)) {
|
||||
if (switcher->VersionChanged(obj, g_GIT_SHA1)) {
|
||||
AskForBackup(obj);
|
||||
}
|
||||
switcher->loadSettings(obj);
|
||||
switcher->LoadSettings(obj);
|
||||
obs_data_release(obj);
|
||||
switcher->m.unlock();
|
||||
|
||||
@@ -225,7 +225,7 @@ void SwitcherData::Thread()
|
||||
}
|
||||
|
||||
vblog(LOG_INFO, "try to sleep for %ld", duration.count());
|
||||
setWaitScene();
|
||||
SetWaitScene();
|
||||
cv.wait_for(lock, duration);
|
||||
|
||||
startTime = std::chrono::high_resolution_clock::now();
|
||||
@@ -239,13 +239,13 @@ void SwitcherData::Thread()
|
||||
if (checkPause()) {
|
||||
continue;
|
||||
}
|
||||
setPreconditions();
|
||||
match = checkForMatch(scene, transition, linger,
|
||||
SetPreconditions();
|
||||
match = CheckForMatch(scene, transition, linger,
|
||||
setPrevSceneAfterLinger, macroMatch);
|
||||
if (stop) {
|
||||
break;
|
||||
}
|
||||
checkNoMatchSwitch(match, scene, transition, sleep);
|
||||
CheckNoMatchSwitch(match, scene, transition, sleep);
|
||||
checkSwitchCooldown(match);
|
||||
|
||||
if (linger) {
|
||||
@@ -253,14 +253,14 @@ void SwitcherData::Thread()
|
||||
vblog(LOG_INFO, "sleep for %ld before switching scene",
|
||||
duration.count());
|
||||
|
||||
setWaitScene();
|
||||
SetWaitScene();
|
||||
cv.wait_for(lock, duration);
|
||||
|
||||
if (stop) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (sceneChangedDuringWait()) {
|
||||
if (SceneChangedDuringWait()) {
|
||||
vblog(LOG_INFO,
|
||||
"scene was changed manually - ignoring match");
|
||||
|
||||
@@ -271,11 +271,11 @@ void SwitcherData::Thread()
|
||||
}
|
||||
}
|
||||
|
||||
resetForNextInterval();
|
||||
ResetForNextInterval();
|
||||
|
||||
if (match) {
|
||||
if (macroMatch) {
|
||||
runMacros();
|
||||
RunMacros();
|
||||
} else {
|
||||
SwitchScene({scene, transition, 0});
|
||||
}
|
||||
@@ -290,7 +290,7 @@ void SwitcherData::Thread()
|
||||
blog(LOG_INFO, "stopped");
|
||||
}
|
||||
|
||||
void SwitcherData::setPreconditions()
|
||||
void SwitcherData::SetPreconditions()
|
||||
{
|
||||
// Window title
|
||||
lastTitle = currentTitle;
|
||||
@@ -324,7 +324,7 @@ void SwitcherData::setPreconditions()
|
||||
lastCursorPos = GetCursorPos();
|
||||
}
|
||||
|
||||
void SwitcherData::resetForNextInterval()
|
||||
void SwitcherData::ResetForNextInterval()
|
||||
{
|
||||
// Core reset functions
|
||||
ClearWebsocketMessages();
|
||||
@@ -334,7 +334,7 @@ void SwitcherData::resetForNextInterval()
|
||||
}
|
||||
}
|
||||
|
||||
bool SwitcherData::checkForMatch(OBSWeakSource &scene,
|
||||
bool SwitcherData::CheckForMatch(OBSWeakSource &scene,
|
||||
OBSWeakSource &transition, int &linger,
|
||||
bool &setPrevSceneAfterLinger,
|
||||
bool ¯oMatch)
|
||||
@@ -384,7 +384,7 @@ bool SwitcherData::checkForMatch(OBSWeakSource &scene,
|
||||
match = checkVideoSwitch(scene, transition);
|
||||
break;
|
||||
case macro_func:
|
||||
if (checkMacros()) {
|
||||
if (CheckMacros()) {
|
||||
match = true;
|
||||
macroMatch = true;
|
||||
}
|
||||
@@ -412,7 +412,7 @@ static void ResetMacros()
|
||||
void SwitcherData::Start()
|
||||
{
|
||||
if (!(th && th->isRunning())) {
|
||||
resetForNextInterval();
|
||||
ResetForNextInterval();
|
||||
ResetMacros();
|
||||
|
||||
stop = false;
|
||||
@@ -464,13 +464,13 @@ void SwitcherData::Stop()
|
||||
}
|
||||
}
|
||||
|
||||
void SwitcherData::setWaitScene()
|
||||
void SwitcherData::SetWaitScene()
|
||||
{
|
||||
waitScene = obs_frontend_get_current_scene();
|
||||
obs_source_release(waitScene);
|
||||
}
|
||||
|
||||
bool SwitcherData::sceneChangedDuringWait()
|
||||
bool SwitcherData::SceneChangedDuringWait()
|
||||
{
|
||||
obs_source_t *currentSource = obs_frontend_get_current_scene();
|
||||
if (!currentSource) {
|
||||
@@ -483,7 +483,7 @@ bool SwitcherData::sceneChangedDuringWait()
|
||||
// Relies on the fact that switcher->currentScene will only be updated on event
|
||||
// OBS_FRONTEND_EVENT_SCENE_CHANGED but obs_frontend_get_current_scene() will
|
||||
// already return the scene to be transitioned to.
|
||||
bool SwitcherData::anySceneTransitionStarted()
|
||||
bool SwitcherData::AnySceneTransitionStarted()
|
||||
{
|
||||
auto currentSceneSrouce = obs_frontend_get_current_scene();
|
||||
auto currentScene = obs_source_get_weak_source(currentSceneSrouce);
|
||||
@@ -510,7 +510,7 @@ void handleSceneChange()
|
||||
std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Stop waiting if scene was changed
|
||||
if (switcher->sceneChangedDuringWait()) {
|
||||
if (switcher->SceneChangedDuringWait()) {
|
||||
switcher->cv.notify_one();
|
||||
}
|
||||
|
||||
@@ -607,8 +607,8 @@ void handleExit()
|
||||
switcher->obsIsShuttingDown = true;
|
||||
if (switcher->shutdownConditionCount) {
|
||||
switcher->Stop();
|
||||
switcher->checkMacros();
|
||||
switcher->runMacros();
|
||||
switcher->CheckMacros();
|
||||
switcher->RunMacros();
|
||||
}
|
||||
FreeSceneSwitcher();
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ void AdvSceneSwitcher::on_exportSettings_clicked()
|
||||
}
|
||||
|
||||
obs_data_t *obj = obs_data_create();
|
||||
switcher->saveSettings(obj);
|
||||
switcher->SaveSettings(obj);
|
||||
obs_data_save_json(obj, file.fileName().toUtf8().constData());
|
||||
obs_data_release(obj);
|
||||
}
|
||||
@@ -302,7 +302,7 @@ void AdvSceneSwitcher::on_importSettings_clicked()
|
||||
}
|
||||
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switcher->loadSettings(obj);
|
||||
switcher->LoadSettings(obj);
|
||||
obs_data_release(obj);
|
||||
switcher->lastImportPath = path.toStdString();
|
||||
|
||||
@@ -394,8 +394,8 @@ int findTabIndex(QTabWidget *tabWidget, int pos)
|
||||
|
||||
void AdvSceneSwitcher::SetTabOrder()
|
||||
{
|
||||
if (!switcher->tabOrderValid()) {
|
||||
switcher->resetTabOrder();
|
||||
if (!switcher->TabOrderValid()) {
|
||||
switcher->ResetTabOrder();
|
||||
}
|
||||
|
||||
QTabBar *bar = ui->tabWidget->tabBar();
|
||||
@@ -483,7 +483,7 @@ void AdvSceneSwitcher::on_adjustActiveTransitionType_stateChanged(int state)
|
||||
switcher->adjustActiveTransitionType = state;
|
||||
}
|
||||
|
||||
void SwitcherData::loadSettings(obs_data_t *obj)
|
||||
void SwitcherData::LoadSettings(obs_data_t *obj)
|
||||
{
|
||||
if (!obj) {
|
||||
return;
|
||||
@@ -492,9 +492,9 @@ void SwitcherData::loadSettings(obs_data_t *obj)
|
||||
// Needs to be loaded before any entries which might rely on scene group
|
||||
// selections to be available.
|
||||
loadSceneGroups(obj);
|
||||
loadVariables(obj);
|
||||
loadConnections(obj);
|
||||
loadMacros(obj);
|
||||
LoadVariables(obj);
|
||||
LoadConnections(obj);
|
||||
LoadMacros(obj);
|
||||
loadWindowTitleSwitches(obj);
|
||||
loadScreenRegionSwitches(obj);
|
||||
loadPauseSwitches(obj);
|
||||
@@ -510,24 +510,24 @@ void SwitcherData::loadSettings(obs_data_t *obj)
|
||||
loadVideoSwitches(obj);
|
||||
loadNetworkSettings(obj);
|
||||
loadSceneTriggers(obj);
|
||||
loadGeneralSettings(obj);
|
||||
loadHotkeys(obj);
|
||||
loadUISettings(obj);
|
||||
LoadGeneralSettings(obj);
|
||||
LoadHotkeys(obj);
|
||||
LoadUISettings(obj);
|
||||
|
||||
// Reset on startup and scene collection change
|
||||
switcher->lastOpenedTab = -1;
|
||||
}
|
||||
|
||||
void SwitcherData::saveSettings(obs_data_t *obj)
|
||||
void SwitcherData::SaveSettings(obs_data_t *obj)
|
||||
{
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
|
||||
saveSceneGroups(obj);
|
||||
saveMacros(obj);
|
||||
saveConnections(obj);
|
||||
saveVariables(obj);
|
||||
SaveMacros(obj);
|
||||
SaveConnections(obj);
|
||||
SaveVariables(obj);
|
||||
saveWindowTitleSwitches(obj);
|
||||
saveScreenRegionSwitches(obj);
|
||||
savePauseSwitches(obj);
|
||||
@@ -543,13 +543,13 @@ void SwitcherData::saveSettings(obs_data_t *obj)
|
||||
saveVideoSwitches(obj);
|
||||
saveNetworkSwitches(obj);
|
||||
saveSceneTriggers(obj);
|
||||
saveGeneralSettings(obj);
|
||||
saveHotkeys(obj);
|
||||
saveUISettings(obj);
|
||||
saveVersion(obj, g_GIT_SHA1);
|
||||
SaveGeneralSettings(obj);
|
||||
SaveHotkeys(obj);
|
||||
SaveUISettings(obj);
|
||||
SaveVersion(obj, g_GIT_SHA1);
|
||||
}
|
||||
|
||||
void SwitcherData::saveGeneralSettings(obs_data_t *obj)
|
||||
void SwitcherData::SaveGeneralSettings(obs_data_t *obj)
|
||||
{
|
||||
obs_data_set_int(obj, "interval", interval);
|
||||
|
||||
@@ -599,7 +599,7 @@ void SwitcherData::saveGeneralSettings(obs_data_t *obj)
|
||||
obs_data_set_string(obj, "lastImportPath", lastImportPath.c_str());
|
||||
}
|
||||
|
||||
void SwitcherData::loadGeneralSettings(obs_data_t *obj)
|
||||
void SwitcherData::LoadGeneralSettings(obs_data_t *obj)
|
||||
{
|
||||
obs_data_set_default_int(obj, "interval", default_interval);
|
||||
interval = obs_data_get_int(obj, "interval");
|
||||
@@ -638,7 +638,7 @@ void SwitcherData::loadGeneralSettings(obs_data_t *obj)
|
||||
hideLegacyTabs = obs_data_get_bool(obj, "hideLegacyTabs");
|
||||
|
||||
SetDefaultFunctionPriorities(obj);
|
||||
if (!prioFuncsValid()) {
|
||||
if (!PrioFuncsValid()) {
|
||||
functionNamesByPriority = GetDefaultFunctionPriorityList();
|
||||
}
|
||||
|
||||
@@ -686,7 +686,7 @@ void loadSplitterPos(QList<int> &sizes, obs_data_t *obj, const std::string name)
|
||||
obs_data_array_release(array);
|
||||
}
|
||||
|
||||
void SwitcherData::saveUISettings(obs_data_t *obj)
|
||||
void SwitcherData::SaveUISettings(obs_data_t *obj)
|
||||
{
|
||||
obs_data_set_int(obj, "generalTabPos", tabOrder[0]);
|
||||
obs_data_set_int(obj, "macroTabPos", tabOrder[1]);
|
||||
@@ -719,7 +719,7 @@ void SwitcherData::saveUISettings(obs_data_t *obj)
|
||||
"macroListMacroEditSplitterPosition");
|
||||
}
|
||||
|
||||
void SwitcherData::loadUISettings(obs_data_t *obj)
|
||||
void SwitcherData::LoadUISettings(obs_data_t *obj)
|
||||
{
|
||||
obs_data_set_default_int(obj, "generalTabPos", 0);
|
||||
obs_data_set_default_int(obj, "macroTabPos", 1);
|
||||
@@ -760,8 +760,8 @@ void SwitcherData::loadUISettings(obs_data_t *obj)
|
||||
tabOrder.emplace_back((int)(obs_data_get_int(obj, "sceneGroupTabPos")));
|
||||
tabOrder.emplace_back((int)(obs_data_get_int(obj, "triggerTabPos")));
|
||||
|
||||
if (!tabOrderValid()) {
|
||||
resetTabOrder();
|
||||
if (!TabOrderValid()) {
|
||||
ResetTabOrder();
|
||||
}
|
||||
|
||||
saveWindowGeo = obs_data_get_bool(obj, "saveWindowGeo");
|
||||
@@ -775,7 +775,7 @@ void SwitcherData::loadUISettings(obs_data_t *obj)
|
||||
"macroListMacroEditSplitterPosition");
|
||||
}
|
||||
|
||||
bool SwitcherData::tabOrderValid()
|
||||
bool SwitcherData::TabOrderValid()
|
||||
{
|
||||
auto tmp = std::vector<int>(tab_count);
|
||||
std::iota(tmp.begin(), tmp.end(), 0);
|
||||
@@ -789,13 +789,13 @@ bool SwitcherData::tabOrderValid()
|
||||
return true;
|
||||
}
|
||||
|
||||
void SwitcherData::resetTabOrder()
|
||||
void SwitcherData::ResetTabOrder()
|
||||
{
|
||||
tabOrder = std::vector<int>(tab_count);
|
||||
std::iota(tabOrder.begin(), tabOrder.end(), 0);
|
||||
}
|
||||
|
||||
void SwitcherData::checkNoMatchSwitch(bool &match, OBSWeakSource &scene,
|
||||
void SwitcherData::CheckNoMatchSwitch(bool &match, OBSWeakSource &scene,
|
||||
OBSWeakSource &transition, int &sleep)
|
||||
{
|
||||
if (match) {
|
||||
|
||||
@@ -223,7 +223,7 @@ void saveHotkey(obs_data_t *obj, obs_hotkey_id id, const char *name)
|
||||
obs_data_array_release(a);
|
||||
}
|
||||
|
||||
void SwitcherData::saveHotkeys(obs_data_t *obj)
|
||||
void SwitcherData::SaveHotkeys(obs_data_t *obj)
|
||||
{
|
||||
saveHotkey(obj, startHotkey, "startHotkey");
|
||||
saveHotkey(obj, stopHotkey, "stopHotkey");
|
||||
@@ -240,7 +240,7 @@ void loadHotkey(obs_data_t *obj, obs_hotkey_id id, const char *name)
|
||||
obs_data_array_release(a);
|
||||
}
|
||||
|
||||
void SwitcherData::loadHotkeys(obs_data_t *obj)
|
||||
void SwitcherData::LoadHotkeys(obs_data_t *obj)
|
||||
{
|
||||
if (!hotkeysRegistered) {
|
||||
registerHotkeys();
|
||||
|
||||
@@ -60,7 +60,7 @@ void AdvSceneSwitcher::on_priorityDown_clicked()
|
||||
switcher->functionNamesByPriority[0] != macro_func);
|
||||
}
|
||||
|
||||
bool SwitcherData::prioFuncsValid()
|
||||
bool SwitcherData::PrioFuncsValid()
|
||||
{
|
||||
auto fNBPCopy = functionNamesByPriority;
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ void importSettings(const std::string &path)
|
||||
if (!obj) {
|
||||
return;
|
||||
}
|
||||
switcher->loadSettings(obj);
|
||||
switcher->LoadSettings(obj);
|
||||
obs_data_release(obj);
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ bool MacroConditionScene::CheckCondition()
|
||||
SetVariableValue(GetWeakSourceName(switcher->currentScene));
|
||||
return switcher->currentScene == _scene.GetScene(false);
|
||||
case Type::PREVIOUS:
|
||||
if (switcher->anySceneTransitionStarted() &&
|
||||
if (switcher->AnySceneTransitionStarted() &&
|
||||
_useTransitionTargetScene) {
|
||||
SetVariableValue(
|
||||
GetWeakSourceName(switcher->currentScene));
|
||||
|
||||
@@ -51,7 +51,7 @@ bool MacroConditionTransition::CheckCondition()
|
||||
{
|
||||
bool anyTransitionEnded = _lastTransitionEndTime !=
|
||||
switcher->lastTransitionEndTime;
|
||||
bool anyTransitionStarted = switcher->anySceneTransitionStarted();
|
||||
bool anyTransitionStarted = switcher->AnySceneTransitionStarted();
|
||||
bool transitionStarted = false;
|
||||
bool transitionEnded = false;
|
||||
|
||||
|
||||
@@ -812,7 +812,7 @@ void Macro::SetHotkeysDesc()
|
||||
_name, _togglePauseHotkey);
|
||||
}
|
||||
|
||||
void SwitcherData::saveMacros(obs_data_t *obj)
|
||||
void SwitcherData::SaveMacros(obs_data_t *obj)
|
||||
{
|
||||
switcher->macroProperties.Save(obj);
|
||||
|
||||
@@ -829,7 +829,7 @@ void SwitcherData::saveMacros(obs_data_t *obj)
|
||||
obs_data_array_release(macroArray);
|
||||
}
|
||||
|
||||
void SwitcherData::loadMacros(obs_data_t *obj)
|
||||
void SwitcherData::LoadMacros(obs_data_t *obj)
|
||||
{
|
||||
Hotkey::ClearAllHotkeys();
|
||||
switcher->macroProperties.Load(obj);
|
||||
@@ -884,7 +884,7 @@ void SwitcherData::loadMacros(obs_data_t *obj)
|
||||
}
|
||||
}
|
||||
|
||||
bool SwitcherData::checkMacros()
|
||||
bool SwitcherData::CheckMacros()
|
||||
{
|
||||
bool ret = false;
|
||||
for (auto &m : macros) {
|
||||
@@ -900,7 +900,7 @@ bool SwitcherData::checkMacros()
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool SwitcherData::runMacros()
|
||||
bool SwitcherData::RunMacros()
|
||||
{
|
||||
// Create copy of macor list as elements might be removed, inserted, or
|
||||
// reordered while macros are currently being executed.
|
||||
|
||||
@@ -152,7 +152,7 @@ void SwitcherData::Prune()
|
||||
}
|
||||
}
|
||||
|
||||
bool SwitcherData::versionChanged(obs_data_t *obj, std::string currentVersion)
|
||||
bool SwitcherData::VersionChanged(obs_data_t *obj, std::string currentVersion)
|
||||
{
|
||||
if (!obs_data_has_user_value(obj, "version")) {
|
||||
return false;
|
||||
@@ -162,13 +162,13 @@ bool SwitcherData::versionChanged(obs_data_t *obj, std::string currentVersion)
|
||||
return previousVersion != currentVersion;
|
||||
}
|
||||
|
||||
void SwitcherData::saveVersion(obs_data_t *obj,
|
||||
void SwitcherData::SaveVersion(obs_data_t *obj,
|
||||
const std::string ¤tVersion)
|
||||
{
|
||||
obs_data_set_string(obj, "version", currentVersion.c_str());
|
||||
}
|
||||
|
||||
void SwitcherData::addResetForNextIntervalFunction(
|
||||
void SwitcherData::AddResetForNextIntervalFunction(
|
||||
std::function<void()> function)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
|
||||
@@ -60,44 +60,44 @@ public:
|
||||
const char *Translate(const char *);
|
||||
obs_module_t *GetModule();
|
||||
|
||||
void setWaitScene();
|
||||
bool sceneChangedDuringWait();
|
||||
bool anySceneTransitionStarted();
|
||||
void SetWaitScene();
|
||||
bool SceneChangedDuringWait();
|
||||
bool AnySceneTransitionStarted();
|
||||
|
||||
void setPreconditions();
|
||||
void resetForNextInterval();
|
||||
void addResetForNextIntervalFunction(std::function<void()>);
|
||||
bool checkForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||
void SetPreconditions();
|
||||
void ResetForNextInterval();
|
||||
void AddResetForNextIntervalFunction(std::function<void()>);
|
||||
bool CheckForMatch(OBSWeakSource &scene, OBSWeakSource &transition,
|
||||
int &linger, bool &setPreviousSceneAsMatch,
|
||||
bool ¯oMatch);
|
||||
bool checkMacros();
|
||||
bool runMacros();
|
||||
void checkNoMatchSwitch(bool &match, OBSWeakSource &scene,
|
||||
bool CheckMacros();
|
||||
bool RunMacros();
|
||||
void CheckNoMatchSwitch(bool &match, OBSWeakSource &scene,
|
||||
OBSWeakSource &transition, int &sleep);
|
||||
|
||||
/* --- Start of saving / loading section --- */
|
||||
|
||||
void saveSettings(obs_data_t *obj);
|
||||
void saveMacros(obs_data_t *obj);
|
||||
void saveConnections(obs_data_t *obj);
|
||||
void saveVariables(obs_data_t *obj);
|
||||
void saveGeneralSettings(obs_data_t *obj);
|
||||
void saveHotkeys(obs_data_t *obj);
|
||||
void saveUISettings(obs_data_t *obj);
|
||||
void saveVersion(obs_data_t *obj, const std::string ¤tVersion);
|
||||
void SaveSettings(obs_data_t *obj);
|
||||
void SaveMacros(obs_data_t *obj);
|
||||
void SaveConnections(obs_data_t *obj);
|
||||
void SaveVariables(obs_data_t *obj);
|
||||
void SaveGeneralSettings(obs_data_t *obj);
|
||||
void SaveHotkeys(obs_data_t *obj);
|
||||
void SaveUISettings(obs_data_t *obj);
|
||||
void SaveVersion(obs_data_t *obj, const std::string ¤tVersion);
|
||||
|
||||
void loadSettings(obs_data_t *obj);
|
||||
void loadMacros(obs_data_t *obj);
|
||||
void loadConnections(obs_data_t *obj);
|
||||
void loadVariables(obs_data_t *obj);
|
||||
void loadGeneralSettings(obs_data_t *obj);
|
||||
void loadHotkeys(obs_data_t *obj);
|
||||
void loadUISettings(obs_data_t *obj);
|
||||
void LoadSettings(obs_data_t *obj);
|
||||
void LoadMacros(obs_data_t *obj);
|
||||
void LoadConnections(obs_data_t *obj);
|
||||
void LoadVariables(obs_data_t *obj);
|
||||
void LoadGeneralSettings(obs_data_t *obj);
|
||||
void LoadHotkeys(obs_data_t *obj);
|
||||
void LoadUISettings(obs_data_t *obj);
|
||||
|
||||
bool versionChanged(obs_data_t *obj, std::string currentVersion);
|
||||
bool tabOrderValid();
|
||||
void resetTabOrder();
|
||||
bool prioFuncsValid();
|
||||
bool VersionChanged(obs_data_t *obj, std::string currentVersion);
|
||||
bool TabOrderValid();
|
||||
void ResetTabOrder();
|
||||
bool PrioFuncsValid();
|
||||
|
||||
/* --- End of saving / loading section --- */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Q_DECLARE_METATYPE(advss::Connection *);
|
||||
|
||||
namespace advss {
|
||||
|
||||
void SwitcherData::saveConnections(obs_data_t *obj)
|
||||
void SwitcherData::SaveConnections(obs_data_t *obj)
|
||||
{
|
||||
obs_data_array_t *connectionArray = obs_data_array_create();
|
||||
for (const auto &c : connections) {
|
||||
@@ -26,7 +26,7 @@ void SwitcherData::saveConnections(obs_data_t *obj)
|
||||
obs_data_array_release(connectionArray);
|
||||
}
|
||||
|
||||
void SwitcherData::loadConnections(obs_data_t *obj)
|
||||
void SwitcherData::LoadConnections(obs_data_t *obj)
|
||||
{
|
||||
connections.clear();
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ std::string GetWeakVariableName(std::weak_ptr<Variable> var_)
|
||||
return var->Name();
|
||||
}
|
||||
|
||||
void SwitcherData::saveVariables(obs_data_t *obj)
|
||||
void SwitcherData::SaveVariables(obs_data_t *obj)
|
||||
{
|
||||
obs_data_array_t *variablesArray = obs_data_array_create();
|
||||
for (const auto &v : variables) {
|
||||
@@ -129,7 +129,7 @@ void SwitcherData::saveVariables(obs_data_t *obj)
|
||||
obs_data_array_release(variablesArray);
|
||||
}
|
||||
|
||||
void SwitcherData::loadVariables(obs_data_t *obj)
|
||||
void SwitcherData::LoadVariables(obs_data_t *obj)
|
||||
{
|
||||
variables.clear();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user