On 27/07/2020 19:30, Stefan Dösinger wrote:
Am 27.07.2020 um 19:05 schrieb Gabriel Ivăncescu <gabrielopcode@gmail.com mailto:gabrielopcode@gmail.com>:
- surface_desc.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT |
DDSD_PIXELFORMAT;
- surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
This will either create a video or system memory surface depending on the whims of the driver. Since we already explicitly test offscreen sysmem surfaces, shouldn't this one request video memory explicitly and skip some tests if creation fails? That might make your broken(hr == DD_OK) /* WinXP */ go away.
You're right, sorry, I'm not very familiar with ddraw. I tried with DDSCAPS_VIDEOMEMORY (and even DDSCAPS_LOCALVIDMEM, though it shouldn't be necessary), unfortunately it's still broken on Windows XP so that broken check has to stay.