#4450 closed defect (fixed)
WINCE: Screen alignment in x2 scalers
Reported by: | SF/pncfreak | Owned by: | SF/knakos |
---|---|---|---|
Priority: | normal | Component: | Port: WinCE |
Version: | Keywords: | ||
Cc: | Game: |
Description
Using x2 scalers in the PocketPC/WinCE ports leads to alignment problems in WVGA devices.
When starting scummVM in landscape mode there will be a 'click-point/mouse cursor' off-set or misalignment of about a fifth of the width of the screen. I.e. when clicking on the screen the mouse cursor will place itself 1-1,5cm to the left of the clicking point.
The game screen (program area) itself is not centered in the screen, but is always aligned with the left side of the screen. Also when rotating the landscape mode 180 degrees.
This situation has been reproduced by Robin Watts under a VS2005 CE 5 pocket pc emulator set to a screen size of 480x800.
In Lostech's 0.14 build (http://www.embeddev.se/ScummVM_ARM_STATIC_2009_02_23.ZIP), this problem disappears when rotating the screen 180 degrees. I.e. the mouse cursor places itself exactly under the point clicked on the screen. The screen is not centered but aligned with the left edge of the screen in this orientation as well
In a later build (Robin Watts' from 2009.07.21) the 180 degrees rotation is no longer possible. When trying to rotate 180 degrees the game area(program area) reverts to original size in the upper left corner of the screen in portrait mode.
Attached you will find screendumps that shows images from the latter build mentioned above, as well as the .ini file.
The game was started in debug mode, but no stderr and stdout was produced.
Ticket imported from: #2825418. Ticket imported from: bugs/4450.
Attachments (8)
Change History (14)
by , 15 years ago
Attachment: | scummvm.ini added |
---|
by , 15 years ago
Attachment: | 3UsingRotateMonkey.jpg added |
---|
Using rotate monkey - reverting to upper left corner
by , 15 years ago
Attachment: | 4UsingRotateMonkeyNoReaction.jpg added |
---|
The rotate monkey does not rotate anything but itself
by , 15 years ago
Attachment: | 5SecondStartupScreenAfterIniWasGenerated.jpg added |
---|
Startupscreen after .ini file was generated
comment:1 by , 15 years ago
The attached images illustrates the problems with the x2 scaler and alignment. It's hard to illustrate the 'click-point/mouse cursor' issue, but it is very much present!
comment:2 by , 15 years ago
I have a fix for the offsetting problem.
In SDL-1.2.6/src/video/wingapi/SDL_gapivideo.c in function GAPI_SetVideoMode at around line 706, there is code:
if (rotation == SDL_ROTATE_NONE) { if (getScreenWidth(this) > width) padWidth = (getScreenWidth(this) - width) / 2; if (getScreenHeight(this) > height) padHeight = (getScreenHeight(this) - height) / 2; } else { if (getScreenWidth(this) > height) padWidth = (getScreenHeight(this) - width) / 2; if (getScreenHeight(this) > width) padHeight = (getScreenWidth(this) - height) / 2; }
change this to:
if (rotation == SDL_ROTATE_NONE) { if (getScreenWidth(this) > width) padWidth = (getScreenWidth(this) - width) / 2; if (getScreenHeight(this) > height) padHeight = (getScreenHeight(this) - height) / 2; } else { if (getScreenWidth(this) > height) padHeight = (getScreenWidth(this) - height) / 2; if (getScreenHeight(this) > width) padWidth = (getScreenHeight(this) - width) / 2; }
and the offsetting is cured. This isn't in ScummVM's code itself, so I can't commit it as a fix. We should update the published diffs with this though.
by , 15 years ago
Attachment: | scummvm_stderr.2.txt added |
---|
stderr from Robin_Watts' latest build (w/fix)
comment:3 by , 15 years ago
Owner: | set to |
---|---|
Summary: | PocketPC/WINCE: Screen alignment in x2 scalers → WINCE: Screen alignment in x2 scalers |
comment:4 by , 15 years ago
OK, committed to SDL branch with thanks to Robin. Fingers crossed there will be no adverse effects (the patch seems logical and tests are good). Updated SDL patches will be provided along with 1.0.0.
BTW, there are no problems with the mouse I gather after this patch?
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:6 by , 6 years ago
Component: | → Port: WinCE |
---|
.ini file