From 9f652f4803d54618f39c843e8b7307de6380e5c7 Mon Sep 17 00:00:00 2001 From: Ethan Vrhel Date: Tue, 10 Aug 2021 13:46:36 -0700 Subject: Fixed an issue regarding a variadic function in callbacks.cpp, a JNI function was being called requiring variadic arguments. The function was passed a non-primitive type (a Reference object). Fixed by calling its object() member function. --- demos/java/jni/gs_jni/callbacks.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'demos') diff --git a/demos/java/jni/gs_jni/callbacks.cpp b/demos/java/jni/gs_jni/callbacks.cpp index 9a2a6fe0e..7826b3289 100644 --- a/demos/java/jni/gs_jni/callbacks.cpp +++ b/demos/java/jni/gs_jni/callbacks.cpp @@ -350,7 +350,18 @@ int callbacks::display::displayRectangleRequestFunction(void *handle, void *devi Reference hRef = Reference(g_env, toWrapperType(g_env, (jint)*h)); code = callIntMethod(g_env, g_displayCallback, "onDisplayRectangleRequest", DISPLAY_RECTANGLE_REQUEST, - (jlong)handle, (jlong)device, memoryRef, oxRef, oyRef, rasterRef, planeRasterRef, xRef, yRef, wRef, hRef); + (jlong)handle, + (jlong)device, + memoryRef.object(), + oxRef.object(), + oyRef.object(), + rasterRef.object(), + planeRasterRef.object(), + xRef.object(), + yRef.object(), + wRef.object(), + hRef.object() + ); *memory = (void *)memoryRef.longValue(); *ox = oxRef.intValue(); -- cgit v1.2.1