1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

add temporary workaround to fix issues in claw custom levels

This commit is contained in:
FunkyFr3sh 2023-10-06 02:11:45 +02:00
parent 77b969a33f
commit 43aa290d1e

View File

@ -1454,9 +1454,10 @@ HRESULT dd_CreateSurface(
((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 ||
(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);