From: Jeff Smith whydoubt@gmail.com
Signed-off-by: Jeff Smith whydoubt@gmail.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 187063.
dlls/d3drm/light.c | 2 +- dlls/d3drm/tests/d3drm.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/dlls/d3drm/light.c b/dlls/d3drm/light.c index 2f53f200aad..675dcaa0b54 100644 --- a/dlls/d3drm/light.c +++ b/dlls/d3drm/light.c @@ -165,7 +165,7 @@ static HRESULT WINAPI d3drm_light_SetColor(IDirect3DRMLight *iface, D3DCOLOR col
TRACE("iface %p, color 0x%08x.\n", iface, color);
- light->color = color; + light->color = 0xff000000 | color;
return D3DRM_OK; } diff --git a/dlls/d3drm/tests/d3drm.c b/dlls/d3drm/tests/d3drm.c index 25e9b4e0ac8..87ad50a39db 100644 --- a/dlls/d3drm/tests/d3drm.c +++ b/dlls/d3drm/tests/d3drm.c @@ -2589,6 +2589,11 @@ static void test_Light(void) color = IDirect3DRMLight_GetColor(light); ok(color == 0xff180587, "wrong color (%x)\n", color);
+ hr = IDirect3DRMLight_SetColor(light, 0x00c0c0c0); + ok(hr == D3DRM_OK, "Got unexpected hr %#x.\n", hr); + color = IDirect3DRMLight_GetColor(light); + ok(color == 0xffc0c0c0, "Got unexpected color 0x%08x.\n", color); + hr = IDirect3DRMLight_SetColorRGB(light, 0.5, 0.5, 0.5); ok(hr == D3DRM_OK, "Cannot set color (hr = %x)\n", hr); color = IDirect3DRMLight_GetColor(light);