[SDL] :1 ?

Neil Bradley nb at synthcom.com
Mon Jul 22 13:23:01 PDT 2002


> Apologies is this is a general C question, but as I have only ever seen this
> used before in SDL I thought I might ask it here. The SDL_VideoInfo struct
> defines variables in the following way...
> Uint32 hw_available :1; /* Flag: Can you create hardware surfaces? */
> ...Does the :1 mean that the hw_available variable is defined as a single
> bit ?

It means that "hw_available" is a single bit in a 32 bit quantity, and the
hw_available/wm_available bits are part of the same UINT32.

Bitwise operators in C are ugly for a variety of reasons, but harmless in
this usage.

-->Neil

-------------------------------------------------------------------------------
Neil Bradley            What are burger lovers saying
Synthcom Systems, Inc.  about the new BK Back Porch Griller?
ICQ #29402898	        "It tastes like it came off the back porch." - Me





More information about the SDL mailing list