Be more flexible with cnc-plugin, also now transparently just works without touching the ini

This commit is contained in:
Toni Spets 2011-08-22 17:40:21 +03:00
parent 2b47947742
commit 30f5b46e6c
4 changed files with 53 additions and 23 deletions

View file

@ -77,9 +77,9 @@ DWORD WINAPI render_soft_main(void)
if (ddraw->primary && (ddraw->primary->palette || ddraw->bpp == 16))
{
if (ddraw->primary->palette)
if (ddraw->primary->palette && ddraw->primary->palette->data_rgb == NULL)
{
memcpy(bmi->bmiColors, ddraw->primary->palette->data_rgb, sizeof(RGBQUAD) * 256);
ddraw->primary->palette->data_rgb = &bmi->bmiColors[0];
}
if (ddraw->render.width != ddraw->width || ddraw->render.height != ddraw->height)