| Summary: | post fix for GAPI hires | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Andrey <afletdinov> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 1.2 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: |
gapi_hires_fix
gapi_hires_fix |
||
Hi developers!
Yesterday I tested the Samsung SGH-i780 (display 320x320, 96dpi and 128dpi):
system display width (orig): 240
system display height (orig): 240
Video properties:
display bpp: 16
display width: 320
display height: 320
system display width: 240
system display height: 240
x pitch: 2
y pitch: 640
gapi flags: 0x80
user orientation: 0
system orientation: 0
gapi orientation: 0
video memory: 0x4cf00000
need update: 1
hi-res fix: 1
VGA is available on the device: 1
use raw framebuffer: 0
video surface bpp: 16
video surface width: 320
video surface height: 320
mouse/arrows transformation angle: 0
He ratio scale is equal to 240 / 320 = 1.33333
So the code is incorrect for hiresFix mode:
SDL_dibevents.c:
static void GapiTransform(GapiInfo *gapiInfo, LONG *x, LONG *y) {
Sint16 rotatedX;
Sint16 rotatedY;
if(gapiInfo->hiresFix)
{
*x *= 2; <- can be use gapiInfo->scale ?
*y *= 2;
}
Created attachment 404 [details]
gapi_hires_fix
I made a mistake with the conclusions.
And last time I as was mistaken with conclusions.
Now I thought about in more detail the algorithm works.
I have made it that the project fheroes2 well worked.
The result of my work in attachment.
I have a possibility to check up it on different models pocketpc.
I checked various modes screen of 320x320, 320x240, 640x480, 800x400.
Your fix is in for the next release. Thanks! |
Created attachment 402 [details] gapi_hires_fix I think that gapi->hiresFix need to set true not only for a fixed screen resolution, but also within range: from 320 to 640 or from 240 to 480 or from 400 to 800.