-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-09 12:17, schrieb Henri Verbeet:
- hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps,
&tmp); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + + color_key.dwColorSpaceLowValue = 0x0000ff00; + color_key.dwColorSpaceHighValue = 0x0000ff00; + hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + memset(&color_key, 0, sizeof(color_key)); + hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + color_key.dwColorSpaceLowValue); + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + color_key.dwColorSpaceHighValue); +
- IDirectDrawSurface_Release(tmp);
Did you mean to call SetColorKey and GetColorKey on tmp instead of surface here?
For the sake of completion it might be interesting to test SetColorKey on cube textures. 5 of the faces are attached to a root surface but aren't mipmap sublevels. (I guess it'll still return DDERR_NOTONMIPMAPSUBLEVEL.)
On 9 January 2014 13:06, Stefan Dösinger stefandoesinger@gmail.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-09 12:17, schrieb Henri Verbeet:
- hr = IDirectDrawSurface7_GetAttachedSurface(surface, &caps,
&tmp); + ok(SUCCEEDED(hr), "Failed to get attached surface, hr %#x.\n", hr); + hr = IDirectDrawSurface7_GetColorKey(tmp, DDCKEY_SRCBLT, &color_key); + ok(hr == DDERR_NOCOLORKEY, "Got unexpected hr %#x, i %u.\n", hr, i); + + color_key.dwColorSpaceLowValue = 0x0000ff00; + color_key.dwColorSpaceHighValue = 0x0000ff00; + hr = IDirectDrawSurface7_SetColorKey(surface, DDCKEY_SRCBLT, &color_key); + ok(SUCCEEDED(hr), "Failed to set color key, hr %#x.\n", hr); + memset(&color_key, 0, sizeof(color_key)); + hr = IDirectDrawSurface7_GetColorKey(surface, DDCKEY_SRCBLT, &color_key); + ok(SUCCEEDED(hr), "Failed to get color key, hr %#x.\n", hr); + ok(color_key.dwColorSpaceLowValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + color_key.dwColorSpaceLowValue); + ok(color_key.dwColorSpaceHighValue == 0x0000ff00, "Got unexpected value 0x%08x.\n", + color_key.dwColorSpaceHighValue); +
- IDirectDrawSurface_Release(tmp);
Did you mean to call SetColorKey and GetColorKey on tmp instead of surface here?
I did, updated patch sent. As an aside, I've noticed this before, but your MUA seems to have some issues with quoting.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Am 2014-01-09 13:49, schrieb Henri Verbeet:
As an aside, I've noticed this before, but your MUA seems to have some issues with quoting.
Yeah, it's quite obvious. Unfortunately it only shows me after I hit send, before that it all looks fine.
I think Thunderbird quotes, then wraps the lines at 80 characters. It properly adjusts the > indentation, but that doesn't really do the expected thing with code.