Henri Verbeet : wined3d: Remove some code that doesn't make sense.

Alexandre Julliard julliard at winehq.org
Tue Oct 13 10:52:54 CDT 2009


Module: wine
Branch: master
Commit: 8949a2c1ad2a6969b5fb53f754586c80593c7dab
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=8949a2c1ad2a6969b5fb53f754586c80593c7dab

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Tue Oct 13 10:38:04 2009 +0200

wined3d: Remove some code that doesn't make sense.

This was introduced by abb11f30cd418c6337a93a26981763b20c059172, but I don't
see how it could ever do something useful. Perhaps that's a lack of
imagination on my part, but the only situation in which device->stateBlock
should be NULL is while creating the initial stateblock, and in that case we
just returned in the line above. Setting the stream frequency of all streams
to 0x01010101 doesn't make sense either.

---

 dlls/wined3d/stateblock.c |   11 +----------
 1 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index e574d3a..6e6dac7 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1658,16 +1658,7 @@ HRESULT stateblock_init(IWineD3DStateBlockImpl *stateblock, IWineD3DDeviceImpl *
      * state block. */
     if (type == WINED3DSBT_INIT || type == WINED3DSBT_RECORDED) return WINED3D_OK;
 
-    /* Otherwise, might as well set the whole state block to the appropriate values  */
-    if (device->stateBlock)
-    {
-        /* Saved values */
-        stateblock_copy_values(stateblock, device->stateBlock, gl_info);
-    }
-    else
-    {
-        memset(stateblock->streamFreq, 1, sizeof(stateblock->streamFreq));
-    }
+    stateblock_copy_values(stateblock, device->stateBlock, gl_info);
 
     TRACE("Updating changed flags appropriate for type %#x.\n", type);
 




More information about the wine-cvs mailing list