Code:
unsigned long *Surface;
ZeroMemory(&ddsd, sizeof(DDSURFACEDESC));
ddsd.dwSize = sizeof(DDSURFACEDESC);
lpDDSBack->Lock(&SrcRect, &ddsd, DDLOCK_WAIT, NULL);
Surface = (unsigned long *)ddsd.lpSurface;
ddsd.lpSurface = Surface;
lpDDSBack->Unlock(Surface);
ZeroMemory(&ddsd, sizeof(DDSURFACEDESC));
ddsd.dwSize = sizeof(DDSURFACEDESC);
lpDDSBack->Lock(&SrcRect, &ddsd, DDLOCK_WAIT, NULL);
Surface = (unsigned long *)ddsd.lpSurface;
ddsd.lpSurface = Surface;
lpDDSBack->Unlock(Surface);
Now this just crashes the moment I use Surface[0] = 0x00FFFFFF in my RenderPixel function. The same code works on an earlier version of WedNESday, so why not this one? The earlier version also performs Surface[0] = 0x00FFFFFF in the RenderPixel function, and that doesn't crash.