summaryrefslogtreecommitdiff
path: root/src/libandroid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libandroid.c')
-rw-r--r--src/libandroid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libandroid.c b/src/libandroid.c
index 1d677ae..eff3b3a 100644
--- a/src/libandroid.c
+++ b/src/libandroid.c
@@ -2,6 +2,7 @@
#include <stdint.h>
#include <stdlib.h>
#include <stdio.h>
+#include <string.h>
#include <assert.h>
#define GLFW_INCLUDE_NONE
@@ -428,6 +429,7 @@ AInputQueue_finishEvent(struct AInputQueue *queue, struct AInputEvent *event, in
// ANative
struct ANativeWindow {
+ char header[4];
GLFWwindow *glfw;
};
@@ -477,6 +479,8 @@ ANativeWindow_fromSurface(JNIEnv* env, jobject surface)
if (!(window = calloc(1, sizeof(*window))))
return NULL;
+ memcpy(window->header, "andr", sizeof(window->header));
+
glfwInit();
fprintf(stderr, "glfw: %s\n", glfwGetVersionString());
glfwSetErrorCallback(glfw_error_cb);