| Table of Contents | ||
|
|
||
| SDLFailed | ||
|
Purpose Tests return value from SDL function call and returns true or false |
||
|
Protoype bool CError::SDLFailed (int i_value) |
||
|
Parameters
|
||
|
Description This function can be used to properly decipher the return value of SDL functions. Since SDL return values are 0 for True and -1 for False, it doesn't make for a clean IF test, and it can also be just plain confusing. This function is inlined to make its usage worthwhile.
|
||
|
Use CError error; if (error.SDLFailed(SDL_BlitSurface(ps_surface1, NULL, ps_surface2, NULL)))
// houston, we have a problem!
|
||
|
|
||
|