UI: Support fractional scaling for Canvas/Base size
Without this change, new profiles created on systems using a fractional scaling factor (e.g., 125%, 150%, 175%) will get an incorrect (X, Y) pair for the new canvas size. For a display with 125% scaling, OBS would set (1536, 864) instead of (1920, 1080). With this change, it will set (1920, 1080).master
parent
ac8eaad483
commit
5cdd084c7f
|
@ -1218,6 +1218,14 @@ bool OBSBasic::InitBasicConfigDefaults()
|
|||
uint32_t cx = primaryScreen->size().width();
|
||||
uint32_t cy = primaryScreen->size().height();
|
||||
|
||||
#ifdef SUPPORTS_FRACTIONAL_SCALING
|
||||
cx *= devicePixelRatioF();
|
||||
cy *= devicePixelRatioF();
|
||||
#elif
|
||||
cx *= devicePixelRatio();
|
||||
cy *= devicePixelRatio();
|
||||
#endif
|
||||
|
||||
bool oldResolutionDefaults = config_get_bool(
|
||||
App()->GlobalConfig(), "General", "Pre19Defaults");
|
||||
|
||||
|
|
Loading…
Reference in New Issue