Mercurial > sdl-ios-xcode
comparison src/video/qnxgf/SDL_gf_input.c @ 3124:d7174e9f65ce
More checks for current GF state were added.
author | Mike Gorchak <lestat@i.com.ua> |
---|---|
date | Thu, 14 May 2009 11:51:42 +0000 |
parents | 7b3a09fb9c8b |
children | 7f684f249ec9 |
comparison
equal
deleted
inserted
replaced
3123:60301ed80050 | 3124:d7174e9f65ce |
---|---|
260 /* to set global mouse settings during SDL initialization */ | 260 /* to set global mouse settings during SDL initialization */ |
261 if (cursor!=NULL) | 261 if (cursor!=NULL) |
262 { | 262 { |
263 mdata=(SDL_MouseData*)cursor->mouse->driverdata; | 263 mdata=(SDL_MouseData*)cursor->mouse->driverdata; |
264 didata=(SDL_DisplayData*)mdata->didata; | 264 didata=(SDL_DisplayData*)mdata->didata; |
265 if ((didata==NULL) || (mdata==NULL)) | |
266 { | |
267 return; | |
268 } | |
265 } | 269 } |
266 else | 270 else |
267 { | 271 { |
268 /* We can't get SDL_DisplayData at this point, return fake success */ | 272 /* We can't get SDL_DisplayData at this point, return fake success */ |
269 return 0; | 273 return 0; |
403 /* Get current window id */ | 407 /* Get current window id */ |
404 window_id=SDL_GetFocusWindow(); | 408 window_id=SDL_GetFocusWindow(); |
405 if (window_id<=0) | 409 if (window_id<=0) |
406 { | 410 { |
407 didata=(SDL_DisplayData*)cursor->mouse->driverdata; | 411 didata=(SDL_DisplayData*)cursor->mouse->driverdata; |
412 if (didata==NULL) | |
413 { | |
414 return; | |
415 } | |
408 } | 416 } |
409 else | 417 else |
410 { | 418 { |
411 /* Sanity checks */ | 419 /* Sanity checks */ |
412 window=SDL_GetWindowFromID(window_id); | 420 window=SDL_GetWindowFromID(window_id); |