diff options
| author | raysan5 <raysan5@gmail.com> | 2016-03-21 20:15:11 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2016-03-21 20:15:11 +0100 |
| commit | 269b120104f468df5f0f00ac3a173770aa5bf09f (patch) | |
| tree | 923e2de3ad58953f1fcadb75009e7e49654b54cd /src | |
| parent | 584e74c6765b63cf6b618f3c38214c3d49322cc2 (diff) | |
| download | raylib-269b120104f468df5f0f00ac3a173770aa5bf09f.tar.gz raylib-269b120104f468df5f0f00ac3a173770aa5bf09f.zip | |
Review Android button inputs
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -146,10 +146,12 @@ static bool windowMinimized = false; #elif defined(PLATFORM_ANDROID) static struct android_app *app; // Android activity static struct android_poll_source *source; // Android events polling source -static int ident, events; +static int ident, events; // Android ALooper_pollAll() variables + static bool windowReady = false; // Used to detect display initialization static bool appEnabled = true; // Used to detec if app is active static bool contextRebindRequired = false; // Used to know context rebind required + static int previousButtonState[128] = { 1 }; // Required to check if button pressed/released once static int currentButtonState[128] = { 1 }; // Required to check if button pressed/released once #elif defined(PLATFORM_RPI) @@ -401,13 +403,6 @@ void InitWindow(int width, int height, struct android_app *state) TraceLog(INFO, "Android app initialized successfully"); - // Init button states values (default up) - for(int i = 0; i < 128; i++) - { - currentButtonState[i] = 1; - previousButtonState[i] = 1; - } - // Wait for window to be initialized (display and context) while (!windowReady) { |
