mirror of
https://github.com/isledecomp/isle.git
synced 2026-01-11 18:51:16 +00:00
implement GetPrimaryBitDepth
This commit is contained in:
parent
216332e64d
commit
aae1734860
@ -2,6 +2,9 @@
|
||||
|
||||
#include "mxdirectdraw.h"
|
||||
|
||||
int g_paletteIndexed8 = 0;
|
||||
BOOL DAT_10100c70 = 0;
|
||||
|
||||
HRESULT MxDirectDraw::SetEntries()
|
||||
{
|
||||
HRESULT ret;
|
||||
@ -49,11 +52,24 @@ void MxDirectDraw::FUN_1009e830(char *error_msg, HRESULT ret)
|
||||
|
||||
int MxDirectDraw::GetPrimaryBitDepth()
|
||||
{
|
||||
DWORD dwRGBBitCount;
|
||||
LPDIRECTDRAW pDDraw;
|
||||
DDSURFACEDESC ddsd;
|
||||
|
||||
DirectDrawCreate(NULL, &pDDraw, NULL);
|
||||
HRESULT result = DirectDrawCreate(NULL, &pDDraw, NULL);
|
||||
dwRGBBitCount = 0;
|
||||
if (!result)
|
||||
{
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = 108;
|
||||
|
||||
return 0;
|
||||
pDDraw->GetDisplayMode(&ddsd);
|
||||
dwRGBBitCount = ddsd.ddpfPixelFormat.dwRGBBitCount;
|
||||
g_paletteIndexed8 = (ddsd.ddpfPixelFormat.dwFlags & DDPF_PALETTEINDEXED8) != 0;
|
||||
pDDraw->Release();
|
||||
}
|
||||
|
||||
return dwRGBBitCount;
|
||||
}
|
||||
|
||||
int MxDirectDraw::Pause(int param_1)
|
||||
|
||||
@ -32,6 +32,4 @@ class MxDirectDraw
|
||||
|
||||
};
|
||||
|
||||
BOOL DAT_10100c70 = 0;
|
||||
|
||||
#endif // MXDIRECTDRAW_H
|
||||
|
||||
Loading…
Reference in New Issue
Block a user