summaryrefslogtreecommitdiffhomepage
path: root/examples/web/text/text_ttf_loading.c
diff options
context:
space:
mode:
authorRay San <[email protected]>2017-11-03 20:01:48 +0100
committerRay San <[email protected]>2017-11-03 20:01:48 +0100
commitd918334a2e1ce32961c0797a4b13fdd5b4ce5630 (patch)
tree1f16feb32953200c2a47cf425352f1bba70ab99a /examples/web/text/text_ttf_loading.c
parente4041e4eb8c55db0a37c8af575c7a98c17963a9a (diff)
downloadraylib.com-d918334a2e1ce32961c0797a4b13fdd5b4ce5630.tar.gz
raylib.com-d918334a2e1ce32961c0797a4b13fdd5b4ce5630.zip
Updated to support Android platform
Diffstat (limited to 'examples/web/text/text_ttf_loading.c')
-rw-r--r--examples/web/text/text_ttf_loading.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/examples/web/text/text_ttf_loading.c b/examples/web/text/text_ttf_loading.c
index 0209743..bb2fc2b 100644
--- a/examples/web/text/text_ttf_loading.c
+++ b/examples/web/text/text_ttf_loading.c
@@ -15,6 +15,10 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -43,11 +47,19 @@ void UpdateDrawFrame(void); // Update and Draw one frame
//----------------------------------------------------------------------------------
// Main Enry Point
//----------------------------------------------------------------------------------
-int main()
+#if defined(PLATFORM_ANDROID)
+void android_main(struct android_app *app)
+#else
+int main(void)
+#endif
{
// Initialization
//--------------------------------------------------------------------------------------
+#if defined(PLATFORM_ANDROID)
+ InitWindow(screenWidth, screenHeight, app);
+#else
InitWindow(screenWidth, screenHeight, "raylib [text] example - ttf loading");
+#endif
// NOTE: Textures/Fonts MUST be loaded after Window initialization (OpenGL context is required)
@@ -85,8 +97,9 @@ int main()
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-
+#if !defined(PLATFORM_ANDROID)
return 0;
+#endif
}
//----------------------------------------------------------------------------------