Use the DD function GetPixelFormat() to get info about the pixel format
of your screen. For example:
DDPIXELFORMAT ddpf;
ZeroMemory( &ddpf, sizeof(DDPIXELFORMAT) );
ddpf.dwSize = sizeof(DDPIXELFORMAT);
if(primary_surface->GetPixelFormat(&ddpf) != DD_OK )
return 0;
This will get the info you want stored in the ddpf struct.
Assuming primary_surface is your main screen.
If your video card supports a 555 format, you will see the
ddpf struct members set like this:
ddpf.dwRBitMask equals 0x7C00
ddpf.dwGBitMask equals 0x03E0
ddpf.dwBBitMask equals 0x001F
and the 565 format would look like this:
ddpf.dwRBitMask equals 0xF800
ddpf.dwGBitMask equals 0x07E0
ddpf.dwBBitMask equals 0x001F
Hope that helps.
-Tank2k