Stefan Dösinger : d3d: Handle the pointsize_min default difference in d3d8.

Alexandre Julliard julliard at winehq.org
Tue Nov 3 15:37:17 CST 2009


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

Author: Stefan Dösinger <stefan at codeweavers.com>
Date:   Tue Oct 20 10:26:06 2009 +0200

d3d: Handle the pointsize_min default difference in d3d8.

---

 dlls/d3d8/device.c        |    3 +++
 dlls/d3d8/directx.c       |    8 +++++++-
 dlls/wined3d/stateblock.c |    2 +-
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index e6c1f5b..50a257d 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -587,6 +587,9 @@ static HRESULT WINAPI IDirect3DDevice8Impl_Reset(LPDIRECT3DDEVICE8 iface, D3DPRE
 
     wined3d_mutex_lock();
     hr = IWineD3DDevice_Reset(This->WineD3DDevice, &localParameters);
+    if(SUCCEEDED(hr)) {
+        hr = IWineD3DDevice_SetRenderState(This->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
+    }
     wined3d_mutex_unlock();
 
     pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 57ddf56..efcdbd6 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -412,11 +412,17 @@ static HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adapte
     }
 
     hr = IWineD3DDevice_Init3D(object->WineD3DDevice, &localParameters);
-    wined3d_mutex_unlock();
     if (hr != D3D_OK) {
+        wined3d_mutex_unlock();
         FIXME("(%p) D3D Initialization failed for WineD3DDevice %p\n", This, object->WineD3DDevice);
         goto err;
     }
+    hr = IWineD3DDevice_SetRenderState(object->WineD3DDevice, WINED3DRS_POINTSIZE_MIN, 0);
+    wined3d_mutex_unlock();
+    if(FAILED(hr)) {
+        FIXME("(%p) SetRenderState failed\n", This);
+        goto err;
+    }
 
     pPresentationParameters->BackBufferWidth                    = localParameters.BackBufferWidth;
     pPresentationParameters->BackBufferHeight                   = localParameters.BackBufferHeight;
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 5c33609..9082c3d 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1161,7 +1161,7 @@ static HRESULT  WINAPI IWineD3DStateBlockImpl_InitStartupStateBlock(IWineD3DStat
     IWineD3DDevice_SetRenderState(device, WINED3DRS_SOFTWAREVERTEXPROCESSING, FALSE);
     tmpfloat.f = 1.0f;
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE,                tmpfloat.d);
-    tmpfloat.f = ((IWineD3DImpl *)This->wineD3DDevice->wineD3D)->dxVersion < 9 ? 0.0f : 1.0f;
+    tmpfloat.f = 1.0f;
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSIZE_MIN,            tmpfloat.d);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSPRITEENABLE,        FALSE);
     IWineD3DDevice_SetRenderState(device, WINED3DRS_POINTSCALEENABLE,         FALSE);




More information about the wine-cvs mailing list