From cdd94b2b59a404c582e06bae56b4eb41277edc60 Mon Sep 17 00:00:00 2001 From: jp9000 Date: Tue, 29 Dec 2020 09:13:37 -0800 Subject: [PATCH] Revert "UI: Only apply new scaling behavior on newer installs" This reverts commit 4e5f20dcbe1506802d9990886aed375cbb75a5b8. This originally was added because of a faulty assumption that it would change defaults, but defaults were apparently broken from 26.0.2 -> 26.1 because primaryScreen->size() changed its behavior, so the original code technically fixed the original behavior. --- UI/obs-app.cpp | 12 ------------ UI/window-basic-main.cpp | 14 ++++---------- 2 files changed, 4 insertions(+), 22 deletions(-) diff --git a/UI/obs-app.cpp b/UI/obs-app.cpp index 09f49175a..afe2e2e0a 100644 --- a/UI/obs-app.cpp +++ b/UI/obs-app.cpp @@ -777,18 +777,6 @@ bool OBSApp::InitGlobalConfig() } #undef PRE_24_1_DEFS -#define PRE_26_2_DEFS "Pre26.2Defaults" - if (!config_has_user_value(globalConfig, "General", PRE_26_2_DEFS)) { - bool useOldDefaults = lastVersion && - lastVersion < - MAKE_SEMANTIC_VERSION(26, 2, 0); - - config_set_bool(globalConfig, "General", PRE_26_2_DEFS, - useOldDefaults); - changed = true; - } -#undef PRE_26_2_DEFS - if (config_has_user_value(globalConfig, "BasicWindow", "MultiviewLayout")) { const char *layout = config_get_string( diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 6e743312a..2f25a33ed 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -1218,19 +1218,13 @@ bool OBSBasic::InitBasicConfigDefaults() uint32_t cx = primaryScreen->size().width(); uint32_t cy = primaryScreen->size().height(); - bool oldScaleBehavior = config_get_bool(App()->GlobalConfig(), - "General", "Pre26.2Defaults"); - - /* after version 26.2, apply scaling to cx/cy */ - if (!oldScaleBehavior) { #ifdef SUPPORTS_FRACTIONAL_SCALING - cx *= devicePixelRatioF(); - cy *= devicePixelRatioF(); + cx *= devicePixelRatioF(); + cy *= devicePixelRatioF(); #elif - cx *= devicePixelRatio(); - cy *= devicePixelRatio(); + cx *= devicePixelRatio(); + cy *= devicePixelRatio(); #endif - } bool oldResolutionDefaults = config_get_bool( App()->GlobalConfig(), "General", "Pre19Defaults");