# HG changeset patch # User Sam Lantinga # Date 1253689310 0 # Node ID cbe5222d051a92b14bcf03a6db8953045eb690d6 # Parent 0adda8ff43ef8a6e09b86e12c0c504e33b3f888e Fixed bug #803 Andrey 2009-09-21 19:14:43 PDT gapi->hiresFix depends on the parameters GetSystemMetrics (SM_CXSCREEN) and GetSystemMetrics (SM_CXSCREEN). After the "Open GAPI display" they are changing. Small patch fixed it. diff -r 0adda8ff43ef -r cbe5222d051a src/video/gapi/SDL_gapivideo.c --- a/src/video/gapi/SDL_gapivideo.c Wed Sep 23 06:57:12 2009 +0000 +++ b/src/video/gapi/SDL_gapivideo.c Wed Sep 23 07:01:50 2009 +0000 @@ -776,9 +776,14 @@ */ WIN_FlushMessageQueue(); - /* Open GAPI display */ + /* Open GAPI display */ if( !gapi->useVga && gapi->useGXOpenDisplay && !gapi->alreadyGXOpened ) { +#if REPORT_VIDEO_INFO + printf("system display width (orig): %d\n", GetSystemMetrics(SM_CXSCREEN)); + printf("system display height (orig): %d\n", GetSystemMetrics(SM_CYSCREEN)); +#endif + gapi->hiresFix = (width > GetSystemMetrics(SM_CXSCREEN)) || (height > GetSystemMetrics(SM_CYSCREEN)); gapi->alreadyGXOpened = 1; if( !gapi->gxFunc.GXOpenDisplay(SDL_Window, GX_FULLSCREEN) ) { diff -r 0adda8ff43ef -r cbe5222d051a src/video/windib/SDL_dibevents.c --- a/src/video/windib/SDL_dibevents.c Wed Sep 23 06:57:12 2009 +0000 +++ b/src/video/windib/SDL_dibevents.c Wed Sep 23 07:01:50 2009 +0000 @@ -92,6 +92,12 @@ Sint16 rotatedX; Sint16 rotatedY; + if(gapiInfo->hiresFix) + { + *x *= 2; + *y *= 2; + } + if(gapiInfo->userOrientation == SDL_ORIENTATION_UP && gapiInfo->gapiOrientation == SDL_ORIENTATION_RIGHT) {