SDL-1.2: [WINCE] Fix detection of screen rotation.

From c4cf838b2a163433099bf3104ae7ae9aa4021609 Mon Sep 17 00:00:00 2001
From: Carlo Bramini <[EMAIL REDACTED]>
Date: Sun, 5 Sep 2021 12:32:07 +0200
Subject: [PATCH] [WINCE] Fix detection of screen rotation.

This PR fixes issue #847
---
 src/video/windib/SDL_dibvideo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/video/windib/SDL_dibvideo.c b/src/video/windib/SDL_dibvideo.c
index 23b78073c..009be3101 100644
--- a/src/video/windib/SDL_dibvideo.c
+++ b/src/video/windib/SDL_dibvideo.c
@@ -359,7 +359,8 @@ int DIB_VideoInit(_THIS, SDL_PixelFormat *vformat)
 	settings.dmDriverExtra = 0;
 #ifdef _WIN32_WCE
 	settings.dmFields = DM_DISPLAYQUERYORIENTATION;
-	this->hidden->supportRotation = ChangeDisplaySettingsEx(NULL, &settings, NULL, CDS_TEST, NULL) == DISP_CHANGE_SUCCESSFUL;
+	if (ChangeDisplaySettingsEx(NULL, &settings, NULL, CDS_TEST, NULL) == DISP_CHANGE_SUCCESSFUL)
+		this->hidden->supportRotation = (settings.dmDisplayOrientation != DMDO_0);
 #endif
 	/* Query for the desktop resolution */
 	SDL_desktop_mode.dmSize = sizeof(SDL_desktop_mode);