Mercurial > sdl-ios-xcode
diff src/video/wincommon/SDL_sysevents.c @ 833:31fa08b36380
Added support for SDL_VIDEO_WINDOW_POS and SDL_VIDEO_CENTERED on Windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 16 Feb 2004 21:09:24 +0000 |
parents | 77bca0665b69 |
children | d31afac94eff |
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysevents.c Mon Feb 16 21:06:10 2004 +0000 +++ b/src/video/wincommon/SDL_sysevents.c Mon Feb 16 21:09:24 2004 +0000 @@ -59,6 +59,8 @@ HINSTANCE SDL_Instance = NULL; HWND SDL_Window = NULL; RECT SDL_bounds = {0, 0, 0, 0}; +int SDL_windowX = 0; +int SDL_windowY = 0; int SDL_resizing = 0; int mouse_relative = 0; int posted = 0; @@ -462,6 +464,10 @@ GetClientRect(SDL_Window, &SDL_bounds); ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds); ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1); + if ( SDL_bounds.left || SDL_bounds.top ) { + SDL_windowX = SDL_bounds.left; + SDL_windowY = SDL_bounds.top; + } w = SDL_bounds.right-SDL_bounds.left; h = SDL_bounds.bottom-SDL_bounds.top; if ( this->input_grab != SDL_GRAB_OFF ) {