summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shapes/shapes_logo_raylib_anim.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/shapes/shapes_logo_raylib_anim.c')
-rw-r--r--examples/web/shapes/shapes_logo_raylib_anim.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/examples/web/shapes/shapes_logo_raylib_anim.c b/examples/web/shapes/shapes_logo_raylib_anim.c
index 238cf84..9cb494c 100644
--- a/examples/web/shapes/shapes_logo_raylib_anim.c
+++ b/examples/web/shapes/shapes_logo_raylib_anim.c
@@ -15,6 +15,10 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -36,7 +40,6 @@ int rightSideRecHeight = 16;
int state = 0; // Tracking animation states (State Machine)
float alpha = 1.0f; // Useful for fading
-
//----------------------------------------------------------------------------------
// Module Functions Declaration
//----------------------------------------------------------------------------------
@@ -45,12 +48,20 @@ 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 [shapes] example - raylib logo animation");
-
+#endif
+
logoPositionX = screenWidth/2 - 128;
logoPositionY = screenHeight/2 - 128;
@@ -71,8 +82,9 @@ int main()
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-
+#if !defined(PLATFORM_ANDROID)
return 0;
+#endif
}
//----------------------------------------------------------------------------------