demos: Avoid objc_msgSend_fpret() on ARM64 macOS.

It's unavailable, and unnecessary.
This commit is contained in:
Henri Verbeet
2025-05-12 13:43:41 +02:00
parent dd34899e97
commit a2d5358ac6
Notes: Henri Verbeet 2025-05-12 15:44:40 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1491

View File

@@ -39,7 +39,7 @@ sub method_parameters($$)
sub send_function($) sub send_function($)
{ {
shift->{'return-float'} ? "objc_msgSend_fpret" : "objc_msgSend"; shift->{'return-float'} ? "vkd3d_objc_msgSend_fpret" : "objc_msgSend";
} }
sub invocation_type($$) sub invocation_type($$)
@@ -129,8 +129,16 @@ sub print_header($)
print "#include <objc/objc-runtime.h>\n\n"; print "#include <objc/objc-runtime.h>\n\n";
print "#ifdef __arm64__\n";
print "# define vkd3d_objc_msgSend_fpret objc_msgSend\n";
print "#else\n";
print "# define vkd3d_objc_msgSend_fpret objc_msgSend_fpret\n";
print "#endif /* __arm64__ */\n\n";
print_interface foreach (@{$grammar->{interfaces}}); print_interface foreach (@{$grammar->{interfaces}});
print "#undef vkd3d_objc_msgSend_fpret\n\n";
print "#endif /* $guard */\n"; print "#endif /* $guard */\n";
} }