Module: wine Branch: master Commit: 286261f69ebc7e661f5f1d276ccfcf76ca44e363 URL: https://gitlab.winehq.org/wine/wine/-/commit/286261f69ebc7e661f5f1d276ccfcf7...
Author: Eric Pouech eric.pouech@gmail.com Date: Tue Dec 6 14:12:13 2022 +0100
wined3d: Reduce usage of long integral types in vertexdeclaration.c.
Signed-off-by: Eric Pouech eric.pouech@gmail.com
---
dlls/wined3d/vertexdeclaration.c | 10 +++++----- include/wine/wined3d.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c index cc18d2ea9ec..befd0a934f9 100644 --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c @@ -323,7 +323,7 @@ static void append_decl_element(struct wined3d_fvf_convert_state *state, }
static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *adapter, - DWORD fvf, struct wined3d_vertex_element **elements) + uint32_t fvf, struct wined3d_vertex_element **elements) { BOOL has_pos = !!(fvf & WINED3DFVF_POSITION_MASK); BOOL has_blend = (fvf & WINED3DFVF_XYZB5) > WINED3DFVF_XYZRHW; @@ -336,12 +336,12 @@ static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *ada BOOL has_diffuse = !!(fvf & WINED3DFVF_DIFFUSE); BOOL has_specular = !!(fvf & WINED3DFVF_SPECULAR);
- DWORD num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; - DWORD texcoords = (fvf & 0xffff0000) >> 16; + unsigned int num_textures = (fvf & WINED3DFVF_TEXCOUNT_MASK) >> WINED3DFVF_TEXCOUNT_SHIFT; + unsigned int texcoords = (fvf & 0xffff0000) >> 16; struct wined3d_fvf_convert_state state; unsigned int size; unsigned int idx; - DWORD num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); + unsigned int num_blends = 1 + (((fvf & WINED3DFVF_XYZB5) - WINED3DFVF_XYZB1) >> 1); if (has_blend_idx) num_blends--;
/* Compute declaration size */ @@ -434,7 +434,7 @@ static unsigned int convert_fvf_to_declaration(const struct wined3d_adapter *ada }
HRESULT CDECL wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, - DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + uint32_t fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration) { struct wined3d_vertex_element *elements; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h index ae0bc309b3f..70ab06209d5 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h @@ -2885,7 +2885,7 @@ HRESULT __cdecl wined3d_vertex_declaration_create(struct wined3d_device *device, const struct wined3d_vertex_element *elements, UINT element_count, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration); HRESULT __cdecl wined3d_vertex_declaration_create_from_fvf(struct wined3d_device *device, - DWORD fvf, void *parent, const struct wined3d_parent_ops *parent_ops, + uint32_t fvf, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_vertex_declaration **declaration); ULONG __cdecl wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration); void * __cdecl wined3d_vertex_declaration_get_parent(const struct wined3d_vertex_declaration *declaration);