Fixed Alien Blaster not working on simulation - I've added lot of debug spam, it should be removed.

The problem is in the least obvious place - the std::ostringstream output deadlocks for no reason -
see file project/jni/application/src/asstring.h.
The only reason I can think of is that previously I've has one big statically linked library,
and now libstlport and libapplication areseparate shared libraries. But why then all std::vectors etc work?
This commit is contained in:
pelya
2010-05-12 19:49:48 +03:00
parent 2adcc9b8d8
commit 94df8e2921
15 changed files with 144 additions and 37 deletions

View File

@@ -113,14 +113,14 @@ class AccelerometerReader implements SensorListener {
class DemoRenderer implements GLSurfaceView.Renderer {
public DemoRenderer(Activity context)
public DemoRenderer(Activity _context)
{
super();
accelerometer = new AccelerometerReader(context);
context = _context;
}
public void onSurfaceCreated(GL10 gl, EGLConfig config) {
nativeInit();
// nativeInit();
}
public void onSurfaceChanged(GL10 gl, int w, int h) {
@@ -129,6 +129,10 @@ class DemoRenderer implements GLSurfaceView.Renderer {
}
public void onDrawFrame(GL10 gl) {
if( accelerometer == null) {
accelerometer = new AccelerometerReader(context);
nativeInit();
}
float [] f = accelerometer.readAccelerometer();
nativeRender(f[0], f[1], f[2]);
}
@@ -142,6 +146,7 @@ class DemoRenderer implements GLSurfaceView.Renderer {
private static native void nativeRender(float accX, float accY, float accZ);
private static native void nativeDone();
private AccelerometerReader accelerometer = null;
private Activity context = null;
}
class DemoGLSurfaceView extends GLSurfaceView {