Commit c5fbf98e authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Enable lights on the correct swapchain.

parent e6c3a2be
......@@ -2996,7 +2996,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
IWineD3DDeviceImpl_MarkStateDirty(This, STATE_ACTIVELIGHT(lightInfo->glIndex));
}
This->stateBlock->activeLights[lightInfo->glIndex] = NULL;
This->updateStateBlock->activeLights[lightInfo->glIndex] = NULL;
lightInfo->glIndex = -1;
} else {
TRACE("Light already disabled, nothing to do\n");
......@@ -3011,8 +3011,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetLightEnable(IWineD3DDevice *iface, D
int i;
/* Find a free gl light */
for(i = 0; i < This->maxConcurrentLights; i++) {
if(This->stateBlock->activeLights[i] == NULL) {
This->stateBlock->activeLights[i] = lightInfo;
if(This->updateStateBlock->activeLights[i] == NULL) {
This->updateStateBlock->activeLights[i] = lightInfo;
lightInfo->glIndex = i;
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment