mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-26 10:29:23 +01:00
add temporary workaround to fix issues in claw custom levels
This commit is contained in:
parent
77b969a33f
commit
43aa290d1e
@ -1454,9 +1454,10 @@ HRESULT dd_CreateSurface(
|
|||||||
((DWORD*)dst_surface->bmi->bmiColors)[2] = 0x0000FF;
|
((DWORD*)dst_surface->bmi->bmiColors)[2] = 0x0000FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Claw hack: 128x128 surfaces need a DC for custom levels to work properly */
|
||||||
if (InterlockedExchangeAdd(&g_dds_gdi_handles, 0) < 4000 ||
|
if (InterlockedExchangeAdd(&g_dds_gdi_handles, 0) < 4000 ||
|
||||||
(dst_surface->width == g_ddraw->width && dst_surface->height == g_ddraw->height))
|
(dst_surface->width == g_ddraw->width && dst_surface->height == g_ddraw->height) ||
|
||||||
|
(dst_surface->width == 128 && dst_surface->height == 128))
|
||||||
{
|
{
|
||||||
dst_surface->hdc = CreateCompatibleDC(g_ddraw->render.hdc);
|
dst_surface->hdc = CreateCompatibleDC(g_ddraw->render.hdc);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user