DisplayServer (Windows): correct resolution for vertical modes

This commit is contained in:
李通洲
2023-03-22 23:43:52 +08:00
parent babb836f91
commit ac8e03419e
@@ -87,9 +87,19 @@ static void detectDisplays(FFDisplayServerResult* ds, bool detectName)
}
}
uint32_t width = modes[path->sourceInfo.modeInfoIdx].sourceMode.width;
uint32_t height = modes[path->sourceInfo.modeInfoIdx].sourceMode.height;
if (path->targetInfo.rotation == DISPLAYCONFIG_ROTATION_ROTATE90 ||
path->targetInfo.rotation == DISPLAYCONFIG_ROTATION_ROTATE270)
{
uint32_t temp = width;
width = height;
height = temp;
}
ffdsAppendDisplay(ds,
modes[path->sourceInfo.modeInfoIdx].sourceMode.width,
modes[path->sourceInfo.modeInfoIdx].sourceMode.height,
width,
height,
path->targetInfo.refreshRate.Numerator / (double) path->targetInfo.refreshRate.Denominator,
data.width,
data.height,