MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / loadDocks

Function loadDocks

lib/macro/macro-dock-window.cpp:50–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48}
49
50static void loadDocks(obs_data_t *obj)
51{
52 std::lock_guard<std::mutex> lock(mutex);
53 windowGeometries.clear();
54 OBSDataAutoRelease data = obs_data_get_obj(obj, "dockWindows");
55 OBSDataArrayAutoRelease array = obs_data_get_array(data, "docks");
56 auto size = obs_data_array_count(array);
57 for (size_t i = 0; i < size; ++i) {
58 OBSDataAutoRelease dockData = obs_data_array_item(array, i);
59 const auto name = obs_data_get_string(dockData, "name");
60 const auto geometry = QByteArray::fromBase64(
61 obs_data_get_string(dockData, "geometry"));
62 windowGeometries[name] = geometry;
63 }
64 AddPostLoadStep(restoreDockGeometry);
65}
66
67[[maybe_unused]] static bool _ = []() {
68 AddPluginInitStep([]() {

Callers

nothing calls this directly

Calls 1

AddPostLoadStepFunction · 0.50

Tested by

no test coverage detected