summaryrefslogtreecommitdiffhomepage
path: root/examples/web/textures/textures_particles_blending.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/textures/textures_particles_blending.c')
-rw-r--r--examples/web/textures/textures_particles_blending.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/examples/web/textures/textures_particles_blending.c b/examples/web/textures/textures_particles_blending.c
index 1ddacf8..c9f468a 100644
--- a/examples/web/textures/textures_particles_blending.c
+++ b/examples/web/textures/textures_particles_blending.c
@@ -15,6 +15,10 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
#define MAX_PARTICLES 200
//----------------------------------------------------------------------------------
@@ -50,13 +54,21 @@ 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 [textures] example - particles blending");
-
- // Initialize particles
+#endif
+
+ // Initialize particles
for (int i = 0; i < MAX_PARTICLES; i++)
{
mouseTail[i].position = (Vector2){ 0, 0 };
@@ -88,8 +100,9 @@ int main()
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-
+#if !defined(PLATFORM_ANDROID)
return 0;
+#endif
}
//----------------------------------------------------------------------------------