Advertisement
Guest User

PSOBB wined3d patch

a guest
Nov 23rd, 2015
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.66 KB | None | 0 0
  1. diff --git a/dlls/wined3d/resource.c b/dlls/wined3d/resource.c
  2. index 999dc5c..574e53f 100644
  3. --- a/dlls/wined3d/resource.c
  4. +++ b/dlls/wined3d/resource.c
  5. @@ -200,8 +200,12 @@ BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource)
  6.      void **p;
  7.      SIZE_T align = RESOURCE_ALIGNMENT - 1 + sizeof(*p);
  8.      void *mem;
  9. +    UINT size = resource->size;
  10.  
  11. -    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, resource->size + align)))
  12. +    size *= 4;
  13. +
  14. +    if (!(mem = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size + align)))
  15.          return FALSE;
  16.  
  17.      p = (void **)(((ULONG_PTR)mem + align) & ~(RESOURCE_ALIGNMENT - 1)) - 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement