Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32window.c @ 1720:a1ebb17f9c52 SDL-1.3
Cleaned up a bunch of warnings, started adding Win32 event support
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 30 Jun 2006 05:42:49 +0000 |
parents | 5b9f50c957ed |
children | 5daa04d862f1 |
comparison
equal
deleted
inserted
replaced
1719:5b9f50c957ed | 1720:a1ebb17f9c52 |
---|---|
22 #include "SDL_config.h" | 22 #include "SDL_config.h" |
23 | 23 |
24 #include "../SDL_sysvideo.h" | 24 #include "../SDL_sysvideo.h" |
25 | 25 |
26 #include "SDL_win32video.h" | 26 #include "SDL_win32video.h" |
27 | |
28 /* This is included after SDL_win32video.h, which includes windows.h */ | |
29 #include "SDL_syswm.h" | |
27 | 30 |
28 | 31 |
29 static int | 32 static int |
30 SetupWindowData(SDL_Window * window, HWND hwnd, BOOL created) | 33 SetupWindowData(SDL_Window * window, HWND hwnd, BOOL created) |
31 { | 34 { |
57 } | 60 } |
58 | 61 |
59 /* Fill in the SDL window with the window data */ | 62 /* Fill in the SDL window with the window data */ |
60 { | 63 { |
61 POINT point; | 64 POINT point; |
65 point.x = 0; | |
66 point.y = 0; | |
62 if (ClientToScreen(hwnd, &point)) { | 67 if (ClientToScreen(hwnd, &point)) { |
63 window->x = point.x; | 68 window->x = point.x; |
64 window->y = point.y; | 69 window->y = point.y; |
65 } | 70 } |
66 } | 71 } |
383 | 388 |
384 SDL_bool | 389 SDL_bool |
385 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) | 390 WIN_GetWindowWMInfo(_THIS, SDL_Window * window, SDL_SysWMinfo * info) |
386 { | 391 { |
387 HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; | 392 HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; |
388 /* FIXME! */ | |
389 #if 0 | |
390 if (info->version.major <= SDL_MAJOR_VERSION) { | 393 if (info->version.major <= SDL_MAJOR_VERSION) { |
391 info->window = hwnd; | 394 info->window = hwnd; |
392 /* FIXME! */ | 395 /* FIXME! */ |
393 info->hglrc = NULL; | 396 info->hglrc = NULL; |
394 return SDL_TRUE; | 397 return SDL_TRUE; |
395 } else { | 398 } else { |
396 SDL_SetError("Application not compiled with SDL %d.%d\n", | 399 SDL_SetError("Application not compiled with SDL %d.%d\n", |
397 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); | 400 SDL_MAJOR_VERSION, SDL_MINOR_VERSION); |
398 return SDL_FALSE; | 401 return SDL_FALSE; |
399 } | 402 } |
400 #endif | |
401 } | 403 } |
402 | 404 |
403 /* vi: set ts=4 sw=4 expandtab: */ | 405 /* vi: set ts=4 sw=4 expandtab: */ |