Commit 749c8a91 authored by Thomas Guillem's avatar Thomas Guillem Committed by Jean-Baptiste Kempf

native_window: add setBuffersGeometry

Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent ecae18a3
......@@ -36,14 +36,18 @@ void *LoadNativeWindowAPI(native_window_api_t *native)
(ptr_ANativeWindow_lock)(dlsym(p_library, "ANativeWindow_lock"));
native->unlockAndPost =
(ptr_ANativeWindow_unlockAndPost)(dlsym(p_library, "ANativeWindow_unlockAndPost"));
native->setBuffersGeometry =
(ptr_ANativeWindow_setBuffersGeometry)(dlsym(p_library, "ANativeWindow_setBuffersGeometry"));
if (native->winFromSurface && native->winRelease && native->winLock && native->unlockAndPost)
if (native->winFromSurface && native->winRelease && native->winLock
&& native->unlockAndPost && native->setBuffersGeometry)
return p_library;
native->winFromSurface = NULL;
native->winRelease = NULL;
native->winLock = NULL;
native->unlockAndPost = NULL;
native->setBuffersGeometry = NULL;
dlclose(p_library);
return NULL;
......
......@@ -35,6 +35,7 @@ typedef ANativeWindow* (*ptr_ANativeWindow_fromSurface)(JNIEnv*, jobject);
typedef void (*ptr_ANativeWindow_release)(ANativeWindow*);
typedef int32_t (*ptr_ANativeWindow_lock)(ANativeWindow*, ANativeWindow_Buffer*, ARect*);
typedef void (*ptr_ANativeWindow_unlockAndPost)(ANativeWindow*);
typedef int32_t (*ptr_ANativeWindow_setBuffersGeometry)(ANativeWindow*, int32_t, int32_t, int32_t);
typedef struct
{
......@@ -42,6 +43,7 @@ typedef struct
ptr_ANativeWindow_release winRelease;
ptr_ANativeWindow_lock winLock;
ptr_ANativeWindow_unlockAndPost unlockAndPost;
ptr_ANativeWindow_setBuffersGeometry setBuffersGeometry;
} native_window_api_t;
/* Fill the structure passed as parameter and return a library handle
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment