[WINESYNC] d3dx9: Move full_name_tmp_size out of struct d3dx9_base_effect.

Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 0c6345322983ed3df9100b801aaa56367b37a501 by Michael Stefaniuc <mstefani@winehq.org>
This commit is contained in:
winesync 2020-09-21 22:40:29 +02:00 committed by Jérôme Gardou
parent 2493cdf262
commit ee5b715bde
2 changed files with 4 additions and 5 deletions

View File

@ -165,8 +165,6 @@ struct d3dx9_base_effect
DWORD flags; DWORD flags;
ULONG64 version_counter; ULONG64 version_counter;
unsigned int full_name_tmp_size;
}; };
struct d3dx_effect struct d3dx_effect
@ -180,6 +178,7 @@ struct d3dx_effect
struct d3dx_object *objects; struct d3dx_object *objects;
struct wine_rb_tree param_tree; struct wine_rb_tree param_tree;
char *full_name_tmp; char *full_name_tmp;
unsigned int full_name_tmp_size;
struct ID3DXEffectStateManager *manager; struct ID3DXEffectStateManager *manager;
struct IDirect3DDevice9 *device; struct IDirect3DDevice9 *device;
@ -932,7 +931,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
name_len = strlen(name); name_len = strlen(name);
param_name_len = strlen(parameter->full_name); param_name_len = strlen(parameter->full_name);
full_name_size = name_len + param_name_len + 2; full_name_size = name_len + param_name_len + 2;
if (base->full_name_tmp_size < full_name_size) if (effect->full_name_tmp_size < full_name_size)
{ {
if (!(full_name = heap_realloc(effect->full_name_tmp, full_name_size))) if (!(full_name = heap_realloc(effect->full_name_tmp, full_name_size)))
{ {
@ -940,7 +939,7 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base,
return NULL; return NULL;
} }
effect->full_name_tmp = full_name; effect->full_name_tmp = full_name;
base->full_name_tmp_size = full_name_size; effect->full_name_tmp_size = full_name_size;
} }
else else
{ {

View File

@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, include/d3dx9anim.h: sdk/inc
include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h, include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: sdk/include/dxsdk/d3dx9of.h,
include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h, include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h} include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: sdk/include/dxsdk/d3dx9xof.h}
tags: {wine: 3779ff07b048bfdaf67674db89aedaa1e4b1e810} tags: {wine: 0c6345322983ed3df9100b801aaa56367b37a501}