[SDL] Feature Query System (Was: Some multithreaded improvement to the event queue...)

Anders F Björklund afb at algonet.se
Sun Sep 18 12:25:08 PDT 2005


  Ricardo Cruz wrote:

>> Err.. sorry for the C++-ish API style :)
>
>  Well, the boolean type also exists in C since the C99 revision. Just 
> do a
> "#include <stdbool.h>".
>
>  Anyway, instead of your define, a more correct code would be 
> something like:
> typedef enum { false, true } bool;

Q: Why not use SDL_bool instead ?

/* Basic data types */
typedef enum {
	SDL_FALSE = 0,
	SDL_TRUE  = 1
} SDL_bool;

 From SDL_types.h...

--anders





More information about the SDL mailing list