From 5d05ab6df618feff5b62a9dbf16d36cfb4f785ee Mon Sep 17 00:00:00 2001 From: jp9000 Date: Sat, 9 Feb 2019 00:43:05 -0800 Subject: [PATCH] UI: Do one time reset of dock lock state for v23 In order to make for a better user experience with service integration, do a one-time reset of the docks locked state, and set the default lock state to off. --- UI/window-basic-main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 5b9f8acdc..be61c3921 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -1688,8 +1688,19 @@ void OBSBasic::OBSInit() on_resetUI_triggered(); } - config_set_default_bool(App()->GlobalConfig(), "BasicWindow", - "DocksLocked", false); + bool pre23Defaults = config_get_bool(App()->GlobalConfig(), + "General", "Pre23Defaults"); + if (pre23Defaults) { + bool resetDockLock23 = config_get_bool(App()->GlobalConfig(), + "General", "ResetDockLock23"); + if (!resetDockLock23) { + config_set_bool(App()->GlobalConfig(), + "General", "ResetDockLock23", true); + config_remove_value(App()->GlobalConfig(), + "BasicWindow", "DocksLocked"); + config_save_safe(App()->GlobalConfig(), "tmp", nullptr); + } + } bool docksLocked = config_get_bool(App()->GlobalConfig(), "BasicWindow", "DocksLocked");