Mercurial > sdl-ios-xcode
diff src/video/win32/SDL_win32video.c @ 4569:e1664f94f026
Andrey A.
I made a video driver GAPI/RAW for WinCE (SDL-1.3).
RAW mode has a priority, and also, GAPI mode works with environment
"SDL_VIDEO_RENDERER=gapi" and for RAW mode "SDL_VIDEO_RENDERER=raw".
I checked the work on the screens of VGA, WVGA, QVGA, WQVGA, HVGA,
+ tested all modes with WindowsMobile Emulator.
Also, correctly draws the pointer position and the scale of the pointer
for VGA/WVGA modes,
correctly draws top left position for DM orientation screen, and
portrait/landscape/square geometry the screen also correct.
Also, I added a small fix for GDI fullscreen mode.
Patch for latest revision SDL-1.3 in an attachment.
Also added small path for mingw32ce build.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 27 Jul 2010 21:31:28 -0700 |
parents | 9faebccfefb3 |
children | 518d1679d2d0 |
line wrap: on
line diff
--- a/src/video/win32/SDL_win32video.c Fri Jul 23 21:33:00 2010 -0700 +++ b/src/video/win32/SDL_win32video.c Tue Jul 27 21:31:28 2010 -0700 @@ -30,6 +30,7 @@ #include "SDL_win32video.h" #include "SDL_d3drender.h" #include "SDL_gdirender.h" +#include "SDL_gapirender.h" /* Initialization/Query functions */ static int WIN_VideoInit(_THIS); @@ -48,6 +49,7 @@ SDL_free(message); } + /* WIN32 driver bootstrap functions */ static int @@ -74,6 +76,11 @@ FreeLibrary(data->ddrawDLL); } #endif +#ifdef _WIN32_WCE + if(data->hAygShell) { + FreeLibrary(data->hAygShell); + } +#endif SDL_free(device->driverdata); SDL_free(device); } @@ -138,6 +145,15 @@ } #endif /* SDL_VIDEO_RENDER_DDRAW */ +#ifdef _WIN32_WCE + data->hAygShell = LoadLibrary(TEXT("\\windows\\aygshell.dll")); + if(0 == data->hAygShell) + data->hAygShell = LoadLibrary(TEXT("aygshell.dll")); + data->SHFullScreen = (0 != data->hAygShell ? + (PFNSHFullScreen) GetProcAddress(data->hAygShell, TEXT("SHFullScreen")) : 0); + data->CoordTransform = NULL; +#endif + /* Set the function pointers */ device->VideoInit = WIN_VideoInit; device->VideoQuit = WIN_VideoQuit; @@ -186,10 +202,13 @@ } VideoBootStrap WIN32_bootstrap = { +#ifdef _WIN32_WCE + "wince", "SDL WinCE video driver", WINCE_Available, WIN_CreateDevice +#else "win32", "SDL Win32/64 video driver", WIN_Available, WIN_CreateDevice +#endif }; - int WIN_VideoInit(_THIS) { @@ -207,7 +226,7 @@ GDI_AddRenderDriver(_this); #endif #if SDL_VIDEO_RENDER_GAPI - GAPI_AddRenderDriver(_this); + WINCE_AddRenderDriver(_this); #endif WIN_InitKeyboard(_this);