[ scummvm-Bugs-2889140 ] WINCE: Force back to Portrait mode when screen rotates

SourceForge.net noreply at sourceforge.net
Fri Oct 30 00:55:27 CET 2009


Bugs item #2889140, was opened at 2009-10-29 19:55
Message generated for change (Tracker Item Submitted) made by burkilos
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2889140&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Graphics
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Burkilos (burkilos)
Assigned to: Nobody/Anonymous (nobody)
Summary: WINCE: Force back to Portrait mode when screen rotates

Initial Comment:
Due to this known GAPI issue (http://support.microsoft.com/kb/843485 - Problems may occur when you use a GAPI application in landscape mode) and the fact that GXOpenDisplay forces device in Portrait mode, switching the display to Landscape while ScummVM is running will throw the mouse cursor out of sync with ScummVM.  Newer HTC devices with GSensor rotation and sliding the keyboard open while in ScummVM will rotate the device against player's will.

The fix, quite simple really, is that if GAPI is used (and I understand that it is the main GX engine for ScummVM on WinCE), force the orientation back to Portrait with ChangeDisplaySettingsEx if devMode.dmDisplayOrientation != 0.

SDL_sysevents.c - getDisplayMode(void)
	r = dynChangeDisplaySettingsEx(NULL, &devMode, NULL, CDS_TEST, NULL);
+	if (devMode.dmDisplayOrientation != 0)
+	{
+		devMode.dmDisplayOrientation = 0;
+		dynChangeDisplaySettingsEx(NULL, &devMode, NULL, CDS_RESET, NULL);
+		debugLog("SDL: Forced Portrait orientation");
+	}
	debugLog("SDL: orientation %d", devMode.dmDisplayOrientation);
	return devMode.dmDisplayOrientation;

This was tested with SVN and HTC Touch Pro 2.  Works with GSensor orientation changes and opening Keyboard.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=2889140&group_id=37116




More information about the Scummvm-tracker mailing list