From 8ac3b701d1b19249fff35e7db8bc4e12212c0886 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20D=C3=B6singer?= <stefan@codeweavers.com>
Date: Sun, 17 Nov 2013 20:25:01 +0100
Subject: wined3d: Make surface_load_location return nothing.

---
 dlls/wined3d/surface.c         | 18 +++++++++---------
 dlls/wined3d/wined3d_private.h |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index 0f16f79..6490235 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -4239,7 +4239,7 @@ static void surface_load_renderbuffer(struct wined3d_surface *surface, struct wi
 }
 
 /* Context activation is done by the caller. Context may be NULL in ddraw-only mode. */
-HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
+void surface_load_location(struct wined3d_surface *surface, struct wined3d_context *context, DWORD location)
 {
     HRESULT hr;
 
@@ -4251,26 +4251,26 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
                 && surface->locations & (WINED3D_LOCATION_DRAWABLE | WINED3D_LOCATION_DISCARDED))
         {
             surface_load_ds_location(surface, context, location);
-            return WINED3D_OK;
+            return;
         }
         else if (location & surface->locations
                 && surface->container->resource.draw_binding != WINED3D_LOCATION_DRAWABLE)
         {
             /* Already up to date, nothing to do. */
-            return WINED3D_OK;
+            return;
         }
         else
         {
             FIXME("Unimplemented copy from %s to %s for depth/stencil buffers.\n",
                     wined3d_debug_location(surface->locations), wined3d_debug_location(location));
-            return WINED3DERR_INVALIDCALL;
+            return;
         }
     }
 
     if (surface->locations & location)
     {
         TRACE("Location already up to date.\n");
-        return WINED3D_OK;
+        return;
     }
 
     if (WARN_ON(d3d_surface))
@@ -4284,7 +4284,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
     if (!surface->locations)
     {
         ERR("Surface %p does not have any up to date location.\n", surface);
-        return WINED3DERR_INVALIDCALL;
+        return;
     }
 
     switch (location)
@@ -4298,7 +4298,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
 
         case WINED3D_LOCATION_DRAWABLE:
             if (FAILED(hr = surface_load_drawable(surface, context)))
-                return hr;
+                return;
             break;
 
         case WINED3D_LOCATION_RB_RESOLVED:
@@ -4310,7 +4310,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
         case WINED3D_LOCATION_TEXTURE_SRGB:
             if (FAILED(hr = surface_load_texture(surface, context,
                     location == WINED3D_LOCATION_TEXTURE_SRGB)))
-                return hr;
+                return;
             break;
 
         default:
@@ -4323,7 +4323,7 @@ HRESULT surface_load_location(struct wined3d_surface *surface, struct wined3d_co
     if (location != WINED3D_LOCATION_SYSMEM && (surface->locations & WINED3D_LOCATION_SYSMEM))
         surface_evict_sysmem(surface);
 
-    return WINED3D_OK;
+    return;
 }
 
 static HRESULT ffp_blit_alloc(struct wined3d_device *device) { return WINED3D_OK; }
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 593456e..c120937 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2463,7 +2463,7 @@ void surface_load_ds_location(struct wined3d_surface *surface,
         struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
 void surface_load_fb_texture(struct wined3d_surface *surface, BOOL srgb,
         struct wined3d_context *context) DECLSPEC_HIDDEN;
-HRESULT surface_load_location(struct wined3d_surface *surface,
+void surface_load_location(struct wined3d_surface *surface,
         struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN;
 void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN;
 void wined3d_surface_prepare(struct wined3d_surface *surface, struct wined3d_context *context,
-- 
2.6.2

