Henri Verbeet : wined3d: Go to the fallbacks if D3D is not initialized in surface_blt().

Alexandre Julliard julliard at winehq.org
Tue Aug 2 14:18:25 CDT 2011


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

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Aug  1 21:35:45 2011 +0200

wined3d: Go to the fallbacks if D3D is not initialized in surface_blt().

Even though this is the "OpenGL" surface implementation, this can still happen
in e.g. ddraw if no swapchain is created yet. That's something we should fix,
but not today.

---

 dlls/wined3d/surface.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 6167bde..c13beb0 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -1304,6 +1304,12 @@ static HRESULT surface_blt(struct wined3d_surface *dst_surface, const RECT *dst_
         goto fallback;
     }
 
+    if (!device->d3d_initialized)
+    {
+        WARN("D3D not initialized, using fallback.\n");
+        goto fallback;
+    }
+
     dst_ds_flags = dst_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);
     if (src_surface)
         src_ds_flags = src_surface->resource.format->flags & (WINED3DFMT_FLAG_DEPTH | WINED3DFMT_FLAG_STENCIL);




More information about the wine-cvs mailing list