Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_sysevents.c @ 4162:3b7fc3416601 SDL-1.2
GAPI fixes from Stefan Klug
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 16 Feb 2009 22:32:34 +0000 |
parents | a1b03ba2fcd0 |
children | a6f635e5eaa6 |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysevents.c Fri Jan 30 01:40:44 2009 +0000 +++ b/src/video/wincommon/SDL_sysevents.c Mon Feb 16 22:32:34 2009 +0000 @@ -50,9 +50,13 @@ #include "wmmsg.h" #endif -#ifdef _WIN32_WCE +#include "../windib/SDL_gapidibvideo.h" + +#ifdef SDL_VIDEO_DRIVER_GAPI #include "../gapi/SDL_gapivideo.h" +#endif +#ifdef _WIN32_WCE #define IsZoomed(HWND) 1 #define NO_GETKEYBOARDSTATE #if _WIN32_WCE < 420 @@ -103,6 +107,9 @@ #if defined(_WIN32_WCE) +//AdjustWindowRect is not available under WinCE 2003 +#define AdjustWindowRect(a,b,c) (AdjustWindowRectEx((a),(b),(c),0)) + // dynamically load aygshell dll because we want SDL to work on HPC and be300 HINSTANCE aygshell = NULL; BOOL (WINAPI *SHFullScreen)(HWND hwndRequester, DWORD dwState) = 0; @@ -211,15 +218,19 @@ static void SDL_RestoreGameMode(void) { -#ifdef _WIN32_WCE +#ifdef _WIN32_WCE //Under ce we don't minimize, therefore no restore + +#ifdef SDL_VIDEO_DRIVER_GAPI SDL_VideoDevice *this = current_video; if(SDL_strcmp(this->name, "gapi") == 0) { - if( this->hidden->suspended ) + if( this->hidden->gapiInfo->suspended ) { - this->hidden->suspended = 0; + this->hidden->gapiInfo->suspended = 0; } } +#endif + #else ShowWindow(SDL_Window, SW_RESTORE); #endif @@ -234,14 +245,18 @@ { #ifdef _WIN32_WCE + +#ifdef SDL_VIDEO_DRIVER_GAPI SDL_VideoDevice *this = current_video; if(SDL_strcmp(this->name, "gapi") == 0) { - if( !this->hidden->suspended ) + if( !this->hidden->gapiInfo->suspended ) { - this->hidden->suspended = 1; + this->hidden->gapiInfo->suspended = 1; } } +#endif + #else /* WinCE does not have a taskbar, so minimizing is not convenient */ ShowWindow(SDL_Window, SW_MINIMIZE); @@ -459,9 +474,9 @@ posted = SDL_PrivateMouseMotion(0, 1, x, y); } } else { -#ifdef _WIN32_WCE - if (SDL_VideoSurface) - GapiTransform(this->hidden->userOrientation, this->hidden->hiresFix, &x, &y); +#ifdef SDL_VIDEO_DRIVER_GAPI + if (SDL_VideoSurface && this->hidden->gapiInfo) + GapiTransform(this->hidden->gapiInfo->coordinateTransform, this->hidden->gapiInfo->hiresFix, &x, &y); #endif posted = SDL_PrivateMouseMotion(0, 0, x, y); } @@ -564,9 +579,9 @@ } else { x = (Sint16)LOWORD(lParam); y = (Sint16)HIWORD(lParam); -#ifdef _WIN32_WCE - if (SDL_VideoSurface) - GapiTransform(this->hidden->userOrientation, this->hidden->hiresFix, &x, &y); +#ifdef SDL_VIDEO_DRIVER_GAPI + if (SDL_VideoSurface && this->hidden->gapiInfo) + GapiTransform(this->hidden->gapiInfo->coordinateTransform, this->hidden->gapiInfo->hiresFix, &x, &y); #endif } posted = SDL_PrivateMouseButton(