From 71d46076497fb4364674f08525e4c9062c646ea4 Mon Sep 17 00:00:00 2001 From: Almas Baim Date: Mon, 23 Dec 2024 10:00:10 +0000 Subject: [PATCH] added convenience callVoidNoArg --- .../com/almasb/fxgl/core/reflect/ForeignFunctionCaller.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fxgl-core/src/main/java/com/almasb/fxgl/core/reflect/ForeignFunctionCaller.java b/fxgl-core/src/main/java/com/almasb/fxgl/core/reflect/ForeignFunctionCaller.java index 849710891..2f3c23256 100644 --- a/fxgl-core/src/main/java/com/almasb/fxgl/core/reflect/ForeignFunctionCaller.java +++ b/fxgl-core/src/main/java/com/almasb/fxgl/core/reflect/ForeignFunctionCaller.java @@ -208,6 +208,10 @@ public Object call(String name, FunctionDescriptor fd, Object... args) { return callImpl(name, fd, args); } + public void callVoidNoArg(String name) { + callImpl(name, FunctionDescriptor.ofVoid()); + } + public MemorySegment allocateIntArray(int length) { return arena.allocate(ValueLayout.JAVA_INT, length); }