aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2016-06-09 23:27:50 +0200
committerRay <raysan5@gmail.com>2016-06-09 23:27:50 +0200
commitfb9047735465537d97c78fdf56bccf7b74ba0bb7 (patch)
tree94771371532d34379451bbf36fff7ffdf8e22a9e
parente2cfc6b838c3e8579f406b6ef18978fc9d958b1c (diff)
parentcbda329bfde0cadc5a1608f8c30c6b7778dec2df (diff)
downloadraylib-fb9047735465537d97c78fdf56bccf7b74ba0bb7.tar.gz
raylib-fb9047735465537d97c78fdf56bccf7b74ba0bb7.zip
Merge pull request #127 from victorfisac/develop
Fix Android template with 1.5 raylib features (audio streaming, gestures)
-rw-r--r--templates/android_project/jni/Android.mk2
-rw-r--r--templates/android_project/jni/basic_game.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/templates/android_project/jni/Android.mk b/templates/android_project/jni/Android.mk
index fe4ba813..15a21695 100644
--- a/templates/android_project/jni/Android.mk
+++ b/templates/android_project/jni/Android.mk
@@ -83,7 +83,7 @@ LOCAL_SRC_FILES := basic_game.c
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include
# Required flags for compilation: defines PLATFORM_ANDROID
-LOCAL_CFLAGS := -Wall -std=c99 -g -DPLATFORM_ANDROID
+LOCAL_CFLAGS := -Wall -std=c99 -DPLATFORM_ANDROID
# Linker required libraries (not many...)
LOCAL_LDLIBS := -llog -landroid -lEGL -lGLESv2 -lOpenSLES
diff --git a/templates/android_project/jni/basic_game.c b/templates/android_project/jni/basic_game.c
index 8a0413c3..a1adb287 100644
--- a/templates/android_project/jni/basic_game.c
+++ b/templates/android_project/jni/basic_game.c
@@ -43,7 +43,7 @@ void android_main(struct android_app *app)
int framesCounter = 0; // Used to count frames
- PlayMusicStream("ambient.ogg");
+ PlayMusicStream(0, "ambient.ogg");
SetTargetFPS(60); // Not required on Android, already locked to 60 fps
//--------------------------------------------------------------------------------------
@@ -53,7 +53,7 @@ void android_main(struct android_app *app)
{
// Update
//----------------------------------------------------------------------------------
- UpdateMusicStream();
+ UpdateMusicStream(0);
switch(currentScreen)
{
@@ -74,7 +74,7 @@ void android_main(struct android_app *app)
// TODO: Update TITLE screen variables here!
// Press enter to change to GAMEPLAY screen
- if (GetGestureType() == GESTURE_TAP)
+ if (IsGestureDetected(GESTURE_TAP))
{
PlaySound(fx);
currentScreen = GAMEPLAY;
@@ -85,7 +85,7 @@ void android_main(struct android_app *app)
// TODO: Update GAMEPLAY screen variables here!
// Press enter to change to ENDING screen
- if (GetGestureType() == GESTURE_TAP)
+ if (IsGestureDetected(GESTURE_TAP))
{
PlaySound(fx);
currentScreen = ENDING;
@@ -96,7 +96,7 @@ void android_main(struct android_app *app)
// TODO: Update ENDING screen variables here!
// Press enter to return to TITLE screen
- if (GetGestureType() == GESTURE_TAP)
+ if (IsGestureDetected(GESTURE_TAP))
{
PlaySound(fx);
currentScreen = TITLE;