#4692 closed defect (fixed)
WINCE: Force back to Portrait mode when screen rotates
Reported by: | SF/burkilos | Owned by: | CeRiAl |
---|---|---|---|
Priority: | normal | Component: | Port: WinCE |
Version: | Keywords: | ||
Cc: | Game: |
Description
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.
Ticket imported from: #2889140. Ticket imported from: bugs/4692.
Change History (9)
comment:1 by , 15 years ago
Owner: | set to |
---|
comment:2 by , 13 years ago
Owner: | changed from | to
---|
comment:3 by , 13 years ago
comment:4 by , 13 years ago
Burkilos, thanks alot for your patch, I've applied it locally and it fixes the problem perfectly (tested on HTC Touch Pro). As the fix is located in the SDL library, it won't be available in the builds generated from buildbot until the library is updated there. I will leave this bug opened until the SDL library is updated on buildbot.
comment:5 by , 13 years ago
The SDL library for WinCE has now been updated on buildbot. If you can check with the daily builds, then this bug can be closed: http://buildbot.scummvm.org/builds.html
comment:6 by , 13 years ago
I just wanted to add that the 1.3.1 release also includes this fix, so no need to try a daily build any more.
Additionally I'm changing the status to "pending" and will close this bug after 14 days as the bug seems to be fixed in all tests and there's no complaint that states otherwise.
comment:7 by , 13 years ago
Status: | new → pending |
---|
comment:8 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | pending → closed |
comment:9 by , 6 years ago
Component: | → Port: WinCE |
---|
Re-assigning to cerial