summaryrefslogtreecommitdiffstats
path: root/samples/RenderScript
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2012-02-07 19:55:19 -0800
committerStephen Hines <srhines@google.com>2012-02-07 19:55:19 -0800
commit432b5a25e66ffd06ff9f544b5428fd90d2fd1e0b (patch)
treef5ea2c7aa03991e6e4aa2ce9ba60928bd2bfffa2 /samples/RenderScript
parentfd7545f53b403a3dc4418eef3e9f4699fb5d46cd (diff)
downloadandroid_development-432b5a25e66ffd06ff9f544b5428fd90d2fd1e0b.tar.gz
android_development-432b5a25e66ffd06ff9f544b5428fd90d2fd1e0b.tar.bz2
android_development-432b5a25e66ffd06ff9f544b5428fd90d2fd1e0b.zip
Fix app bug, where some memory could remain uninitialized due to early exit.
Change-Id: I4bdeff1c9f28c4e27f42559f89b925819b82cfc2
Diffstat (limited to 'samples/RenderScript')
-rw-r--r--samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs2
-rw-r--r--samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs4
2 files changed, 3 insertions, 3 deletions
diff --git a/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs b/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs
index ee6ab1da8..0d9bdc3ca 100644
--- a/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs
+++ b/samples/RenderScript/Balls/src/com/example/android/rs/balls/ball_physics.rs
@@ -58,7 +58,7 @@ void root(const Ball_t *ballIn, Ball_t *ballOut, const BallControl_t *ctl, uint3
//ballOut->color.rgb = 1.f;
//ballOut->arcID = -1;
//ballOut->arcStr = 0;
- return;
+ continue;
}
// Collision
float2 axis = normalize(vec);
diff --git a/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs b/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs
index d61557cfb..39bebbfbe 100644
--- a/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs
+++ b/samples/RenderScript/Balls/src/com/example/android/rs/balls/balls.rs
@@ -58,11 +58,11 @@ int root() {
if (frame & 1) {
bc.ain = rsGetAllocation(balls2);
bc.aout = rsGetAllocation(balls1);
- bout = balls2;
+ bout = balls1;
} else {
bc.ain = rsGetAllocation(balls1);
bc.aout = rsGetAllocation(balls2);
- bout = balls1;
+ bout = balls2;
}
bc.dimX = rsAllocationGetDimX(bc.ain);