[SDL] :1 ?

Joseph Carter knghtbrd at bluecherry.net
Mon Jul 22 17:05:01 PDT 2002


On Mon, Jul 22, 2002 at 04:03:46PM -0700, Luke J Crook wrote:
> First, thanks to all who answered my question.
> 
> I performed a sizeof() on the SDL_VideoInfo struct (excluding the
> SDL_PixelFormat field), which returned 8 bytes total
> 
> typedef struct {
>  Uint32 hw_available :1;
>  Uint32 wm_available :1;
>  Uint32 UnusedBits1  :6;
> // == 1 byte
>  Uint32 UnusedBits2  :1;
>  Uint32 blit_hw      :1;
>  Uint32 blit_hw_CC   :1;
>  Uint32 blit_hw_A    :1;
>  Uint32 blit_sw      :1;
>  Uint32 blit_sw_CC   :1;
>  Uint32 blit_sw_A    :1;
>  Uint32 blit_fill    :1;
> // == 1 byte
>  Uint32 UnusedBits3  :16;
> // == 2 bytes
>  Uint32 video_mem;
> // == 4 bytes
> // SDL_PixelFormat *vfmt;
> } SDL_VideoInfo;

Yeah, do some math now..  All those bits add up to ... 32 bits.

-- 
Joseph Carter <knghtbrd at bluecherry.net>       Now I'll take over the world
 
Every company complaining about Microsoft's business practices is simply a
rose bush. They look lovely and smell nice. Once a lucky company dethrones
Microsoft they will shed their petals to expose the thorns underneath. A
thorn by any other name would hurt as much.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020722/1818e9b2/attachment-0008.pgp>


More information about the SDL mailing list