diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 2758b72e5..67b4c0fed 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -583,6 +583,7 @@ static string GetSceneCollectionFileFromName(const char *name) bool OBSApp::InitGlobalConfig() { char path[512]; + bool changed = false; int len = GetConfigPath(path, sizeof(path), "obs-studio/global.ini"); @@ -606,6 +607,7 @@ bool OBSApp::InitGlobalConfig() config_set_string(globalConfig, "Basic", "SceneCollectionFile", path.c_str()); + changed = true; } } @@ -617,9 +619,24 @@ bool OBSApp::InitGlobalConfig() opt_starting_profile.c_str()); config_set_string(globalConfig, "Basic", "ProfileDir", path.c_str()); + changed = true; } } + if (!config_has_user_value(globalConfig, "General", "OldDefaults")) { + uint32_t lastVersion = config_get_int(globalConfig, "General", + "LastVersion"); + bool useOldDefaults = lastVersion && + lastVersion < MAKE_SEMANTIC_VERSION(19, 0, 0); + + config_set_bool(globalConfig, "General", "Pre19Defaults", + useOldDefaults); + changed = true; + } + + if (changed) + config_save_safe(globalConfig, "tmp", nullptr); + return InitGlobalConfigDefaults(); } diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index d788adcc2..3264e94ca 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -913,6 +913,17 @@ bool OBSBasic::InitBasicConfigDefaults() uint32_t cx = primaryScreen->size().width(); uint32_t cy = primaryScreen->size().height(); + bool oldResolutionDefaults = config_get_bool(App()->GlobalConfig(), + "General", "Pre19Defaults"); + + /* use 1920x1080 for new default base res if main monitor is above + * 1920x1080, but don't apply for people from older builds -- only to + * new users */ + if (!oldResolutionDefaults && (cx * cy) > (1920 * 1080)) { + cx = 1920; + cy = 1080; + } + /* ----------------------------------------------------- */ /* move over mixer values in advanced if older config */ if (config_has_user_value(basicConfig, "AdvOut", "RecTrackIndex") &&