Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions frontend/widgets/OBSBasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <QThread>
#include <QWidgetAction>

#include <mutex>
#ifdef _WIN32
#include <sstream>
#endif
Expand Down Expand Up @@ -107,6 +108,10 @@ extern bool cef_js_avail;
extern void DestroyPanelCookieManager();
extern void CheckExistingCookieId();

namespace {
std::once_flag saveOnceFlag;
}

static void AddExtraModulePaths()
{
string plugins_path, plugins_data_path;
Expand Down Expand Up @@ -1849,16 +1854,19 @@ void OBSBasic::saveAll()
saveGeometry().toBase64().constData());
}

Auth::Save();
SaveProjectNow();
std::call_once(saveOnceFlag, [this]() {
Auth::Save();
SaveProjectNow();

config_set_string(App()->GetUserConfig(), "BasicWindow", "DockState", saveState().toBase64().constData());
config_set_string(App()->GetUserConfig(), "BasicWindow", "DockState",
saveState().toBase64().constData());

#ifdef BROWSER_AVAILABLE
if (cef) {
SaveExtraBrowserDocks();
}
if (cef) {
SaveExtraBrowserDocks();
}
#endif
});

config_set_int(App()->GetAppConfig(), "General", "LastVersion", LIBOBS_API_VER);
config_save_safe(App()->GetAppConfig(), "tmp", nullptr);
Expand Down
Loading