Mercurial > sdl-ios-xcode
diff src/video/windows/SDL_windowswindow.c @ 5088:c2539ff054c8
Fixed compiling on Windows Mobile SDK 5.0 with Visual Studio 2008
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 24 Jan 2011 15:46:11 -0800 |
parents | e8916fe9cfc8 |
children | 455bc74f7034 |
line wrap: on
line diff
--- a/src/video/windows/SDL_windowswindow.c Mon Jan 24 15:10:16 2011 -0800 +++ b/src/video/windows/SDL_windowswindow.c Mon Jan 24 15:46:11 2011 -0800 @@ -32,6 +32,10 @@ #include "SDL_syswm.h" #include "SDL_gapirender.h" +/* Windows CE compatibility */ +#ifndef SWP_NOCOPYBITS +#define SWP_NOCOPYBITS 0 +#endif /* Fake window to help with DirectInput events. */ HWND SDL_HelperWindow = NULL; @@ -68,13 +72,21 @@ } /* Set up the window proc function */ +#ifdef GWLP_WNDPROC data->wndproc = (WNDPROC) GetWindowLongPtr(hwnd, GWLP_WNDPROC); if (data->wndproc == WIN_WindowProc) { data->wndproc = NULL; - } - else { + } else { SetWindowLongPtr(hwnd, GWLP_WNDPROC, (LONG_PTR) WIN_WindowProc); } +#else + data->wndproc = (WNDPROC) GetWindowLong(hwnd, GWL_WNDPROC); + if (data->wndproc == WIN_WindowProc) { + data->wndproc = NULL; + } else { + SetWindowLong(hwnd, GWL_WNDPROC, (LONG_PTR) WIN_WindowProc); + } +#endif /* Fill in the SDL window with the window data */ { @@ -112,14 +124,20 @@ } else { window->flags &= ~SDL_WINDOW_RESIZABLE; } +#ifdef WS_MAXIMIZE if (style & WS_MAXIMIZE) { window->flags |= SDL_WINDOW_MAXIMIZED; - } else { + } else +#endif + { window->flags &= ~SDL_WINDOW_MAXIMIZED; } +#ifdef WS_MINIMIZE if (style & WS_MINIMIZE) { window->flags |= SDL_WINDOW_MINIMIZED; - } else { + } else +#endif + { window->flags &= ~SDL_WINDOW_MINIMIZED; } }