diff --git a/src/winapi_hooks.c b/src/winapi_hooks.c index 40a4c96..86e95b2 100644 --- a/src/winapi_hooks.c +++ b/src/winapi_hooks.c @@ -856,13 +856,18 @@ int WINAPI fake_GetDeviceCaps(HDC hdc, int index) { return g_ddraw.bpp; } - - if (g_ddraw.ref && - g_ddraw.bpp == 8 && - index == RASTERCAPS && - (g_config.hook != 2 || g_ddraw.renderer == gdi_render_main)) + + if (g_ddraw.ref && g_ddraw.bpp == 8 && (g_config.hook != 2 || g_ddraw.renderer == gdi_render_main)) { - return RC_PALETTE | real_GetDeviceCaps(hdc, index); + if (index == RASTERCAPS) + { + return RC_PALETTE | real_GetDeviceCaps(hdc, index); + } + + if (index == SIZEPALETTE || index == NUMCOLORS) + { + return 256; + } } return real_GetDeviceCaps(hdc, index);