Watch
2
0
Fork
You've already forked raylib-cs
0

Convert android project to example project

This commit is contained in:
Rgebee 2023-09-05 07:20:02 +01:00
commit d716a80775
9 changed files with 21 additions and 13 deletions

View file

@ -1,27 +0,0 @@
diff --git a/src/rcore.c b/src/rcore.c
index eae4951..4400b22 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -1,3 +1,22 @@
+#if defined (PLATFORM_ANDROID)
+#include <stdlib.h>
+
+typedef void (*RaylibAndroidCallback)();
+static RaylibAndroidCallback _androidCallback = NULL;
+
+void RaylibSetAndroidCallback(RaylibAndroidCallback callback) {
+ _androidCallback = callback;
+}
+
+int main(int argc, char *argv[]) {
+ (void)argc;
+ (void)argv;
+ while (_androidCallback == NULL) {
+ }
+ _androidCallback();
+}
+#endif
+
/**********************************************************************************************
*
* rcore - Basic functions to manage windows, OpenGL context and input on multiple platforms