comparison test/testwm.c @ 1724:6c63fc2bd986 SDL-1.3

Proof of concept done - Win32 GDI implementation mostly complete.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 06 Jul 2006 07:17:11 +0000
parents 8d7fecceb9ef
children 875c3cf1a12c
comparison
equal deleted inserted replaced
1723:4bdbb9b2bd0a 1724:6c63fc2bd986
174 event.type = SDL_USEREVENT; 174 event.type = SDL_USEREVENT;
175 SDL_PushEvent(&event); 175 SDL_PushEvent(&event);
176 } 176 }
177 177
178 int SDLCALL 178 int SDLCALL
179 FilterEvents(SDL_Event * event) 179 FilterEvents(void *userdata, SDL_Event * event)
180 { 180 {
181 static int reallyquit = 0; 181 static int reallyquit = 0;
182 182
183 switch (event->type) { 183 switch (event->type) {
184 184
342 if (SetVideoMode(w, h) < 0) { 342 if (SetVideoMode(w, h) < 0) {
343 quit(1); 343 quit(1);
344 } 344 }
345 345
346 /* Set an event filter that discards everything but QUIT */ 346 /* Set an event filter that discards everything but QUIT */
347 SDL_SetEventFilter(FilterEvents); 347 SDL_SetEventFilter(FilterEvents, NULL);
348 348
349 /* Ignore key up events, they don't even get filtered */ 349 /* Ignore key up events, they don't even get filtered */
350 SDL_EventState(SDL_KEYUP, SDL_IGNORE); 350 SDL_EventState(SDL_KEYUP, SDL_IGNORE);
351 351
352 /* Loop, waiting for QUIT */ 352 /* Loop, waiting for QUIT */