Skip to content

Commit 29994af

Browse files
derrodLain-B
authored andcommitted
UI: Retain existing last output resolution
1 parent 0cc357f commit 29994af

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

UI/window-basic-main.cpp

+9
Original file line numberDiff line numberDiff line change
@@ -1306,6 +1306,15 @@ void OBSBasic::LoadData(obs_data_t *data, const char *file)
13061306
vcamConfig.source = obs_data_get_string(obj, "source");
13071307
}
13081308

1309+
if (obs_data_has_user_value(data, "resolution")) {
1310+
OBSDataAutoRelease res = obs_data_get_obj(data, "resolution");
1311+
if (obs_data_has_user_value(res, "x") &&
1312+
obs_data_has_user_value(res, "y")) {
1313+
lastOutputResolution = {obs_data_get_int(res, "x"),
1314+
obs_data_get_int(res, "y")};
1315+
}
1316+
}
1317+
13091318
/* ---------------------- */
13101319

13111320
if (api)

0 commit comments

Comments
 (0)