summaryrefslogtreecommitdiffhomepage
path: root/examples/web/shapes/shapes_lines_bezier.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/web/shapes/shapes_lines_bezier.c')
-rw-r--r--examples/web/shapes/shapes_lines_bezier.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/examples/web/shapes/shapes_lines_bezier.c b/examples/web/shapes/shapes_lines_bezier.c
index 6aab2ca..475e309 100644
--- a/examples/web/shapes/shapes_lines_bezier.c
+++ b/examples/web/shapes/shapes_lines_bezier.c
@@ -15,6 +15,11 @@
#include <emscripten/emscripten.h>
#endif
+#if defined(PLATFORM_ANDROID)
+ #include "android_native_app_glue.h"
+#endif
+
+
//----------------------------------------------------------------------------------
// Global Variables Definition
//----------------------------------------------------------------------------------
@@ -32,13 +37,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
//--------------------------------------------------------------------------------------
SetConfigFlags(FLAG_MSAA_4X_HINT);
+#if defined(PLATFORM_ANDROID)
+ InitWindow(screenWidth, screenHeight, app);
+#else
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - cubic-bezier lines");
-
+#endif
end = (Vector2){ screenWidth, screenHeight };
#if defined(PLATFORM_WEB)
@@ -58,8 +70,9 @@ int main()
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
-
+#if !defined(PLATFORM_ANDROID)
return 0;
+#endif
}
//----------------------------------------------------------------------------------