Mercurial > sdl-ios-xcode
comparison src/video/win32/SDL_win32events.c @ 1913:83420da906a5
Implemented Windows OpenGL support
Fixed slowdown enumerating display modes, which was hosing OpenGL as well...
Removed SDL_ from the render driver prefixes
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 17 Jul 2006 06:47:33 +0000 |
parents | c121d94672cb |
children | 7177581dc9fa |
comparison
equal
deleted
inserted
replaced
1912:8d384b647307 | 1913:83420da906a5 |
---|---|
27 #include "SDL_vkeys.h" | 27 #include "SDL_vkeys.h" |
28 #include "../../events/SDL_events_c.h" | 28 #include "../../events/SDL_events_c.h" |
29 | 29 |
30 /*#define WMMSG_DEBUG*/ | 30 /*#define WMMSG_DEBUG*/ |
31 #ifdef WMMSG_DEBUG | 31 #ifdef WMMSG_DEBUG |
32 #include <stdio.h> | |
32 #include "wmmsg.h" | 33 #include "wmmsg.h" |
33 #endif | 34 #endif |
34 | 35 |
35 /* Masks for processing the windows KEYDOWN and KEYUP messages */ | 36 /* Masks for processing the windows KEYDOWN and KEYUP messages */ |
36 #define REPEATED_KEYMASK (1<<30) | 37 #define REPEATED_KEYMASK (1<<30) |
396 data = (SDL_WindowData *) GetProp(hwnd, TEXT("SDL_WindowData")); | 397 data = (SDL_WindowData *) GetProp(hwnd, TEXT("SDL_WindowData")); |
397 if (!data) { | 398 if (!data) { |
398 return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam); | 399 return CallWindowProc(DefWindowProc, hwnd, msg, wParam, lParam); |
399 } | 400 } |
400 #ifdef WMMSG_DEBUG | 401 #ifdef WMMSG_DEBUG |
401 fprintf(stderr, "Received windows message: "); | 402 { |
402 if (msg > MAX_WMMSG) { | 403 FILE *log = fopen("wmmsg.txt", "a"); |
403 fprintf(stderr, "%d", msg); | 404 fprintf(log, "Received windows message: %p ", hwnd); |
404 } else { | 405 if (msg > MAX_WMMSG) { |
405 fprintf(stderr, "%s", wmtab[msg]); | 406 fprintf(log, "%d", msg); |
406 } | 407 } else { |
407 fprintf(stderr, " -- 0x%X, 0x%X\n", wParam, lParam); | 408 fprintf(log, "%s", wmtab[msg]); |
409 } | |
410 fprintf(log, " -- 0x%X, 0x%X\n", wParam, lParam); | |
411 fclose(log); | |
412 } | |
408 #endif | 413 #endif |
409 | 414 |
410 /* Send a SDL_SYSWMEVENT if the application wants them */ | 415 /* Send a SDL_SYSWMEVENT if the application wants them */ |
411 if (SDL_ProcessEvents[SDL_SYSWMEVENT] == SDL_ENABLE) { | 416 if (SDL_ProcessEvents[SDL_SYSWMEVENT] == SDL_ENABLE) { |
412 SDL_SysWMmsg wmmsg; | 417 SDL_SysWMmsg wmmsg; |