diff options
| author | raysan5 <raysan5@gmail.com> | 2018-07-05 19:00:49 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2018-07-05 19:00:49 +0200 |
| commit | 1f1d8eeeeb5aa34cfa41784c88cdce11fa525fa1 (patch) | |
| tree | 70a621b2dd5e1fbbe3b5fb5e6432c65e2f608a79 /src | |
| parent | 7c362370488d740ec89cbdd0803b85ee8336711e (diff) | |
| download | raylib-1f1d8eeeeb5aa34cfa41784c88cdce11fa525fa1.tar.gz raylib-1f1d8eeeeb5aa34cfa41784c88cdce11fa525fa1.zip | |
Checking Android input functionality
Joystick support is not implemented just yet, not difficult but it
requires some work...
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -3079,7 +3079,8 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd) // Android: Get input events static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) { - //http://developer.android.com/ndk/reference/index.html + // If additional inputs are required check: + // https://developer.android.com/ndk/reference/group/input int type = AInputEvent_getType(event); @@ -3092,6 +3093,11 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event) // Get second touch position touchPosition[1].x = AMotionEvent_getX(event, 1); touchPosition[1].y = AMotionEvent_getY(event, 1); + + // Useful functions for gamepad inputs: + //AMotionEvent_getAction() + //AMotionEvent_getAxisValue() + //AMotionEvent_getButtonState() } else if (type == AINPUT_EVENT_TYPE_KEY) { |
