From: Jacek Caban jacek@codeweavers.com
--- dlls/opengl32/make_opengl | 14 ++++++++------ dlls/opengl32/thunks.c | 3 +-- dlls/opengl32/unixlib.h | 2 +- 3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/dlls/opengl32/make_opengl b/dlls/opengl32/make_opengl index 906324ad947..01ca0c60b4c 100755 --- a/dlls/opengl32/make_opengl +++ b/dlls/opengl32/make_opengl @@ -582,16 +582,11 @@ sub generate_win_thunk($$) foreach my $arg (@{$func->[1]}) { my $pname = get_arg_name( $arg ); - $params .= ", .$pname = $pname" unless $arg->textContent() =~ /[/; + $params .= ", .$pname = $pname"; } $ret .= " = {$params }"; $ret .= ";\n"; $ret .= " NTSTATUS status;\n"; - foreach my $arg (@{$func->[1]}) - { - my $pname = get_arg_name( $arg ); - $ret .= " memcpy( args.$pname, $pname, sizeof(args.$pname) );\n" if $arg->textContent() =~ /[/; - } $ret .= " " . get_func_trace( $name, $func, 1 ) if $gen_traces; $ret .= " if ((status = UNIX_CALL( $name, &args ))) WARN( "$name returned %#lx\n", status );\n"; $ret .= " return args.ret;\n" unless is_void_func($func); @@ -662,6 +657,13 @@ sub generate_func_params($$) $ret .= " TEB *teb;\n"; foreach my $arg (@{$func->[1]}) { + my $ptype = get_arg_type( $arg ); + if ($ptype =~ /]$/) + { + $ptype =~ s/[.*//; + $ret .= " $ptype*" . get_arg_name( $arg ) . ";\n"; + next; + } $ret .= sprintf " %s;\n", $arg->textContent(); } $ret .= sprintf " %sret;\n", $func->[0]->textContent() unless is_void_func($func); diff --git a/dlls/opengl32/thunks.c b/dlls/opengl32/thunks.c index ccabbbc7519..319d6e0c359 100644 --- a/dlls/opengl32/thunks.c +++ b/dlls/opengl32/thunks.c @@ -14875,9 +14875,8 @@ static GLenum WINAPI glPathGlyphIndexArrayNV( GLuint firstPathName, GLenum fontT
static GLenum WINAPI glPathGlyphIndexRangeNV( GLenum fontTarget, const void *fontName, GLbitfield fontStyle, GLuint pathParameterTemplate, GLfloat emScale, GLuint baseAndCount[2] ) { - struct glPathGlyphIndexRangeNV_params args = { .teb = NtCurrentTeb(), .fontTarget = fontTarget, .fontName = fontName, .fontStyle = fontStyle, .pathParameterTemplate = pathParameterTemplate, .emScale = emScale }; + struct glPathGlyphIndexRangeNV_params args = { .teb = NtCurrentTeb(), .fontTarget = fontTarget, .fontName = fontName, .fontStyle = fontStyle, .pathParameterTemplate = pathParameterTemplate, .emScale = emScale, .baseAndCount = baseAndCount }; NTSTATUS status; - memcpy( args.baseAndCount, baseAndCount, sizeof(args.baseAndCount) ); TRACE( "fontTarget %d, fontName %p, fontStyle %d, pathParameterTemplate %d, emScale %f, baseAndCount %p\n", fontTarget, fontName, fontStyle, pathParameterTemplate, emScale, baseAndCount ); if ((status = UNIX_CALL( glPathGlyphIndexRangeNV, &args ))) WARN( "glPathGlyphIndexRangeNV returned %#lx\n", status ); return args.ret; diff --git a/dlls/opengl32/unixlib.h b/dlls/opengl32/unixlib.h index afd349a5601..db2efff8f50 100644 --- a/dlls/opengl32/unixlib.h +++ b/dlls/opengl32/unixlib.h @@ -15387,7 +15387,7 @@ struct glPathGlyphIndexRangeNV_params GLbitfield fontStyle; GLuint pathParameterTemplate; GLfloat emScale; - GLuint baseAndCount[2]; + GLuint *baseAndCount; GLenum ret; };