comparison src/video/wincommon/SDL_sysevents.c @ 333:f2ba51f64d49

Fixed a crash bug in the WM_ACTIVATE code (thanks John!)
author Sam Lantinga <slouken@libsdl.org>
date Tue, 09 Apr 2002 23:32:40 +0000
parents 3d6dd1b7b7ba
children bc4d50d2edd9
comparison
equal deleted inserted replaced
332:3d6dd1b7b7ba 333:f2ba51f64d49
188 case WM_ACTIVATE: { 188 case WM_ACTIVATE: {
189 SDL_VideoDevice *this = current_video; 189 SDL_VideoDevice *this = current_video;
190 BOOL minimized; 190 BOOL minimized;
191 Uint8 appstate; 191 Uint8 appstate;
192 192
193 if ( ! this->screen ) {
194 /* What do we do when we get the screen? */
195 return(0);
196 }
193 minimized = HIWORD(wParam); 197 minimized = HIWORD(wParam);
194 if ( !minimized && (LOWORD(wParam) != WA_INACTIVE) ) { 198 if ( !minimized && (LOWORD(wParam) != WA_INACTIVE) ) {
195 /* Gain the following states */ 199 /* Gain the following states */
196 appstate = SDL_APPACTIVE|SDL_APPINPUTFOCUS; 200 appstate = SDL_APPACTIVE|SDL_APPINPUTFOCUS;
197 if ( this->input_grab != SDL_GRAB_OFF ) { 201 if ( this->input_grab != SDL_GRAB_OFF ) {