From cac454d9cfbdd0fd53a93c6f3057f8dd583e1efb Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 18 Jan 2021 15:15:36 +1100 Subject: [PATCH] [host] dxgi: reverse the rotation angle. This is undocumented however testing yields that DXGI DD reports the inverse rotation. Research shows that this is because of a difference in coordiate spaces. Ref: https://docs.microsoft.com/en-us/windows/uwp/gaming/supporting-screen-rotation-directx-and-cpp --- host/platform/Windows/capture/DXGI/src/dxgi.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/host/platform/Windows/capture/DXGI/src/dxgi.c b/host/platform/Windows/capture/DXGI/src/dxgi.c index bb3cdd53..9b17dcd4 100644 --- a/host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/host/platform/Windows/capture/DXGI/src/dxgi.c @@ -394,7 +394,7 @@ static bool dxgi_init(void) switch(outputDesc.Rotation) { case DXGI_MODE_ROTATION_ROTATE90: - this->rotation = CAPTURE_ROT_90; + this->rotation = CAPTURE_ROT_270; break; case DXGI_MODE_ROTATION_ROTATE180: @@ -402,8 +402,7 @@ static bool dxgi_init(void) break; case DXGI_MODE_ROTATION_ROTATE270: - this->rotation = CAPTURE_ROT_270; - + this->rotation = CAPTURE_ROT_90; break; default: