[PATCH 5/5] d3dx9_36: Make emsquare an unsigned int in create_outline.

Stefan Dösinger stefan at codeweavers.com
Thu Jan 9 06:43:24 CST 2014


The input data retrieved from GetGlyphOutline is an UINT. Following the
use of plain C data types in create_outline and convert_fixed_to_float
using an unsigned int seems like the correct approach.
---
 dlls/d3dx9_36/mesh.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
index b713079..118baf7 100644
--- a/dlls/d3dx9_36/mesh.c
+++ b/dlls/d3dx9_36/mesh.c
@@ -5128,7 +5128,7 @@ static HRESULT add_vertex_index(struct word_array *array, WORD vertex_index)
 C_ASSERT(sizeof(FIXED) == sizeof(float));
 C_ASSERT(sizeof(POINTFX) == sizeof(D3DXVECTOR2));
 
-static inline D3DXVECTOR2 *convert_fixed_to_float(POINTFX *pt, int count, float emsquare)
+static inline D3DXVECTOR2 *convert_fixed_to_float(POINTFX *pt, int count, unsigned int emsquare)
 {
     D3DXVECTOR2 *ret = (D3DXVECTOR2*)pt;
     while (count--) {
@@ -5233,7 +5233,8 @@ static BOOL attempt_line_merge(struct outline *outline,
 }
 
 static HRESULT create_outline(struct glyphinfo *glyph, void *raw_outline, int datasize,
-                              float max_deviation_sq, float emsquare, const struct cos_table *cos_table)
+                              float max_deviation_sq, unsigned int emsquare,
+                              const struct cos_table *cos_table)
 {
     TTPOLYGONHEADER *header = (TTPOLYGONHEADER *)raw_outline;
 
-- 
1.8.3.2




More information about the wine-patches mailing list