diff options
Diffstat (limited to 'examples/web/textures/textures_image_processing.c')
| -rw-r--r-- | examples/web/textures/textures_image_processing.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/examples/web/textures/textures_image_processing.c b/examples/web/textures/textures_image_processing.c index 39b40fe..68b894e 100644 --- a/examples/web/textures/textures_image_processing.c +++ b/examples/web/textures/textures_image_processing.c @@ -19,6 +19,10 @@ #include <emscripten/emscripten.h> #endif +#if defined(PLATFORM_ANDROID) + #include "android_native_app_glue.h" +#endif + #define NUM_PROCESSES 8 //---------------------------------------------------------------------------------- @@ -65,12 +69,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 [textures] example - image processing"); - +#endif + // NOTE: Textures MUST be loaded after Window initialization (OpenGL context is required) image = LoadImage("resources/parrots.png"); // Loaded in CPU memory (RAM) @@ -99,8 +111,9 @@ int main() CloseWindow(); // Close window and OpenGL context //-------------------------------------------------------------------------------------- - +#if !defined(PLATFORM_ANDROID) return 0; +#endif } //---------------------------------------------------------------------------------- |
