Am 2017-02-01 um 11:02 schrieb Henri Verbeet:
hr = set_display_mode(ddraw, 640, 480); ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
- memset(&surface_desc, 0, sizeof(surface_desc));
- surface_desc.dwSize = sizeof(surface_desc);
- hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
- ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth);
- ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight);
- ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32
|| U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24,
"Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
Since we know ddraw does magic on WM_DISPLAYCHANGE messages: Does this also happen when you change the mode behind ddraw's back with ChangeDisplaySettings?
On 1 February 2017 at 19:56, Stefan Dösinger stefandoesinger@gmail.com wrote:
Am 2017-02-01 um 11:02 schrieb Henri Verbeet:
hr = set_display_mode(ddraw, 640, 480); ok(SUCCEEDED(hr), "Failed to set display mode, hr %#x.\n", hr);
- memset(&surface_desc, 0, sizeof(surface_desc));
- surface_desc.dwSize = sizeof(surface_desc);
- hr = IDirectDrawSurface_GetSurfaceDesc(primary, &surface_desc);
- ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
- ok(surface_desc.dwWidth == 640, "Got unexpected surface width %u.\n", surface_desc.dwWidth);
- ok(surface_desc.dwHeight == 480, "Got unexpected surface height %u.\n", surface_desc.dwHeight);
- ok(U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 32
|| U1(surface_desc.ddpfPixelFormat).dwRGBBitCount == 24,
"Got unexpected bit count %u.\n", U1(surface_desc.ddpfPixelFormat).dwRGBBitCount);
Since we know ddraw does magic on WM_DISPLAYCHANGE messages: Does this also happen when you change the mode behind ddraw's back with ChangeDisplaySettings?
Quite possibly, but I didn't explicitly test that.