mirror of
https://github.com/isledecomp/isle-portable.git
synced 2025-09-23 03:55:44 -04:00
Add support for 8bit color key (#110)
This commit is contained in:
parent
d1e3a69141
commit
77cb46f91d
@ -236,6 +236,17 @@ HRESULT DirectDrawSurfaceImpl::SetClipper(LPDIRECTDRAWCLIPPER lpDDClipper)
|
||||
|
||||
HRESULT DirectDrawSurfaceImpl::SetColorKey(DDColorKeyFlags dwFlags, LPDDCOLORKEY lpDDColorKey)
|
||||
{
|
||||
if (!lpDDColorKey) {
|
||||
return DDERR_INVALIDPARAMS;
|
||||
}
|
||||
if (m_surface->format != SDL_PIXELFORMAT_INDEX8) {
|
||||
return DDERR_GENERIC; // Not currently supported
|
||||
}
|
||||
|
||||
if (SDL_SetSurfaceColorKey(m_surface, true, lpDDColorKey->dwColorSpaceLowValue) != 0) {
|
||||
return DDERR_GENERIC;
|
||||
}
|
||||
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user