Skip to content

Commit

Permalink
fix 8-bit directdraw avi capture
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 30, 2011
1 parent 047c531 commit d7f3a24
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/wintasee/hooks/ddrawhooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,10 +291,12 @@ struct MyDirectDrawSurface
if(pSurface != pBackBuffer)
if(!pSurface || FAILED(BltFast(pSurface, 0,0,pBackBuffer,NULL,DDBLTFAST_WAIT)))
pSurface = pBackBuffer; // fallback
desc.ddpfPixelFormat.dwSize = sizeof(DDPIXELFORMAT);
GetPixelFormat(pThis, &desc.ddpfPixelFormat);
if(desc.ddpfPixelFormat.dwRGBBitCount == 8)
{
LPDIRECTDRAWPALETTE pPalette;
if(SUCCEEDED(pSurface->GetPalette(&pPalette)))
if(SUCCEEDED(pThis->GetPalette(&pPalette)))
{
pPalette->GetEntries(0, 0, 256, &activePalette[0]);
pPalette->Release();
Expand Down

0 comments on commit d7f3a24

Please sign in to comment.