Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32video.h @ 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 | c24ba2cc9583 |
comparison
equal
deleted
inserted
replaced
4568:25b9cd8bdc30 | 4569:e1664f94f026 |
---|---|
26 | 26 |
27 #include "../SDL_sysvideo.h" | 27 #include "../SDL_sysvideo.h" |
28 | 28 |
29 #define WIN32_LEAN_AND_MEAN | 29 #define WIN32_LEAN_AND_MEAN |
30 #define STRICT | 30 #define STRICT |
31 #ifndef UNICODE | |
31 #define UNICODE | 32 #define UNICODE |
33 #endif | |
32 #undef WINVER | 34 #undef WINVER |
33 #define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */ | 35 #define WINVER 0x500 /* Need 0x410 for AlphaBlend() and 0x500 for EnumDisplayDevices() */ |
34 #include <windows.h> | 36 #include <windows.h> |
35 | 37 |
36 #if SDL_VIDEO_RENDER_D3D | 38 #if SDL_VIDEO_RENDER_D3D |
61 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1)) | 63 #define WIN_StringToUTF8(S) SDL_iconv_string("UTF-8", "ASCII", (char *)S, (SDL_strlen(S)+1)) |
62 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1) | 64 #define WIN_UTF8ToString(S) SDL_iconv_string("ASCII", "UTF-8", (char *)S, SDL_strlen(S)+1) |
63 #endif | 65 #endif |
64 extern void WIN_SetError(const char *prefix); | 66 extern void WIN_SetError(const char *prefix); |
65 | 67 |
68 enum { RENDER_NONE, RENDER_D3D, RENDER_DDRAW, RENDER_GDI, RENDER_GAPI, RENDER_RAW }; | |
69 | |
70 typedef BOOL (*PFNSHFullScreen)(HWND, DWORD); | |
71 typedef void (*PFCoordTransform)(SDL_Window*, POINT*); | |
72 | |
66 /* Private display data */ | 73 /* Private display data */ |
67 | 74 |
68 typedef struct SDL_VideoData | 75 typedef struct SDL_VideoData |
69 { | 76 { |
77 int render; | |
78 | |
70 #if SDL_VIDEO_RENDER_D3D | 79 #if SDL_VIDEO_RENDER_D3D |
71 HANDLE d3dDLL; | 80 HANDLE d3dDLL; |
72 IDirect3D9 *d3d; | 81 IDirect3D9 *d3d; |
73 #endif | 82 #endif |
74 #if SDL_VIDEO_RENDER_DDRAW | 83 #if SDL_VIDEO_RENDER_DDRAW |
75 HANDLE ddrawDLL; | 84 HANDLE ddrawDLL; |
76 IDirectDraw *ddraw; | 85 IDirectDraw *ddraw; |
86 #endif | |
87 #ifdef _WIN32_WCE | |
88 HMODULE hAygShell; | |
89 PFNSHFullScreen SHFullScreen; | |
90 PFCoordTransform CoordTransform; | |
77 #endif | 91 #endif |
78 | 92 |
79 DWORD clipboard_count; | 93 DWORD clipboard_count; |
80 | 94 |
81 const SDL_scancode *key_layout; | 95 const SDL_scancode *key_layout; |