| 48 | } |
| 49 | |
| 50 | static 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([]() { |
nothing calls this directly
no test coverage detected