(Android) Camera update - update onCameraPoll Java function -

remove ret variable - remove FIXME in C camera driver for Android
This commit is contained in:
twinaphex 2013-11-21 15:37:28 +01:00
parent 4df7eabd79
commit 7f0aafbcba
2 changed files with 7 additions and 13 deletions

View File

@ -36,11 +36,10 @@ public final class RetroActivity extends NativeActivity
@SuppressLint("NewApi")
public boolean onCameraPoll()
{
boolean ret;
if (texture == null)
{
Log.i("RetroActivity", "no texture");
ret = false;
return true;
}
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
{
@ -48,23 +47,19 @@ public final class RetroActivity extends NativeActivity
{
texture.updateTexImage();
}
long newTimestamp = texture.getTimestamp();
if (newTimestamp != lastTimestamp)
{
lastTimestamp = newTimestamp;
ret = true;
return true;
}
else
{
ret = false;
}
}
else
{
ret = true;
return false;
}
return ret;
return true;
}
public void onCameraFree()

View File

@ -157,7 +157,6 @@ static bool android_camera_poll(void *data, retro_camera_frame_raw_framebuffer_t
0.0f, 0.0f, 1.0f
};
// FIXME: Still only gets a black picture back
if (frame_gl_cb)
frame_gl_cb(androidcamera->tex,
GL_TEXTURE_EXTERNAL_OES,