UI: Do not allow invalid downscale/rescale values
For the 'output resolution' setting in video settings, do not show values in the list that it does not support (width must be aligned to a 128bit boundry, and height must be divisible by two) For the 'rescale' settings in advanced outputs, the scales must all be divisible by two.
This commit is contained in:
parent
c69e7c96f3
commit
21ec81ebcc
@ -424,6 +424,11 @@ void OBSBasicSettings::ResetDownscales(uint32_t cx, uint32_t cy,
|
||||
uint32_t outDownscaleCX = uint32_t(double(out_cx) / vals[idx]);
|
||||
uint32_t outDownscaleCY = uint32_t(double(out_cy) / vals[idx]);
|
||||
|
||||
downscaleCX &= 0xFFFFFFFC;
|
||||
downscaleCY &= 0xFFFFFFFE;
|
||||
outDownscaleCX &= 0xFFFFFFFE;
|
||||
outDownscaleCY &= 0xFFFFFFFE;
|
||||
|
||||
string res = ResString(downscaleCX, downscaleCY);
|
||||
string outRes = ResString(outDownscaleCX, outDownscaleCY);
|
||||
ui->outputResolution->addItem(res.c_str());
|
||||
|
Loading…
x
Reference in New Issue
Block a user