comparison 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
comparison
equal deleted inserted replaced
832:f003714db2f4 833:31fa08b36380
57 LPSTR SDL_Appname = NULL; 57 LPSTR SDL_Appname = NULL;
58 #endif 58 #endif
59 HINSTANCE SDL_Instance = NULL; 59 HINSTANCE SDL_Instance = NULL;
60 HWND SDL_Window = NULL; 60 HWND SDL_Window = NULL;
61 RECT SDL_bounds = {0, 0, 0, 0}; 61 RECT SDL_bounds = {0, 0, 0, 0};
62 int SDL_windowX = 0;
63 int SDL_windowY = 0;
62 int SDL_resizing = 0; 64 int SDL_resizing = 0;
63 int mouse_relative = 0; 65 int mouse_relative = 0;
64 int posted = 0; 66 int posted = 0;
65 #ifndef NO_CHANGEDISPLAYSETTINGS 67 #ifndef NO_CHANGEDISPLAYSETTINGS
66 DEVMODE SDL_fullscreen_mode; 68 DEVMODE SDL_fullscreen_mode;
460 int w, h; 462 int w, h;
461 463
462 GetClientRect(SDL_Window, &SDL_bounds); 464 GetClientRect(SDL_Window, &SDL_bounds);
463 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds); 465 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds);
464 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1); 466 ClientToScreen(SDL_Window, (LPPOINT)&SDL_bounds+1);
467 if ( SDL_bounds.left || SDL_bounds.top ) {
468 SDL_windowX = SDL_bounds.left;
469 SDL_windowY = SDL_bounds.top;
470 }
465 w = SDL_bounds.right-SDL_bounds.left; 471 w = SDL_bounds.right-SDL_bounds.left;
466 h = SDL_bounds.bottom-SDL_bounds.top; 472 h = SDL_bounds.bottom-SDL_bounds.top;
467 if ( this->input_grab != SDL_GRAB_OFF ) { 473 if ( this->input_grab != SDL_GRAB_OFF ) {
468 ClipCursor(&SDL_bounds); 474 ClipCursor(&SDL_bounds);
469 } 475 }