wined3d: Enable lights on the correct swapchain.

Henri Verbeet hverbeet at codeweavers.com
Fri Oct 3 01:55:41 CDT 2008


This caused some interesting behaviour.
---
 dlls/wined3d/device.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 409c7a1..2e13613 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -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;
                 }
-- 
1.5.6.4



--------------040900060007020008090500--



More information about the wine-patches mailing list