Microsoft DirectX 8.1 (C++) |
Determines whether it is necessary to create a new palette.
Syntax
BOOL ShouldUpdate(
const VIDEOINFOHEADER *pNewInfo,
const VIDEOINFOHEADER *pOldInfo
);
Parameters
pNewInfo
Pointer to a VIDEOINFOHEADER structure containing the new set of colors.
pOldInfo
Pointer to a VIDEOINFOHEADER structure containing the old set of colors.
Return Value
Returns one of the following values.
Value | Description |
TRUE | A new palette is required. |
FALSE | The existing palette suffices. |
Remarks
Use this function to test whether it is necessary to create a new palette. If the original type does not use a palette and the new one does (or vice versa), this method returns TRUE. If neither formats use a palette, this method returns FALSE. If both formats use a palette, the colors are compared, and if they match, the method returns FALSE.
See Also