(Android) Camera update - update onCameraPoll Java function -
remove ret variable - remove FIXME in C camera driver for Android
This commit is contained in:
parent
4df7eabd79
commit
7f0aafbcba
|
@ -36,11 +36,10 @@ public final class RetroActivity extends NativeActivity
|
||||||
@SuppressLint("NewApi")
|
@SuppressLint("NewApi")
|
||||||
public boolean onCameraPoll()
|
public boolean onCameraPoll()
|
||||||
{
|
{
|
||||||
boolean ret;
|
|
||||||
if (texture == null)
|
if (texture == null)
|
||||||
{
|
{
|
||||||
Log.i("RetroActivity", "no texture");
|
Log.i("RetroActivity", "no texture");
|
||||||
ret = false;
|
return true;
|
||||||
}
|
}
|
||||||
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
|
||||||
{
|
{
|
||||||
|
@ -48,23 +47,19 @@ public final class RetroActivity extends NativeActivity
|
||||||
{
|
{
|
||||||
texture.updateTexImage();
|
texture.updateTexImage();
|
||||||
}
|
}
|
||||||
|
|
||||||
long newTimestamp = texture.getTimestamp();
|
long newTimestamp = texture.getTimestamp();
|
||||||
|
|
||||||
if (newTimestamp != lastTimestamp)
|
if (newTimestamp != lastTimestamp)
|
||||||
{
|
{
|
||||||
lastTimestamp = newTimestamp;
|
lastTimestamp = newTimestamp;
|
||||||
ret = true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
return false;
|
||||||
ret = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ret = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCameraFree()
|
public void onCameraFree()
|
||||||
|
|
|
@ -157,7 +157,6 @@ static bool android_camera_poll(void *data, retro_camera_frame_raw_framebuffer_t
|
||||||
0.0f, 0.0f, 1.0f
|
0.0f, 0.0f, 1.0f
|
||||||
};
|
};
|
||||||
|
|
||||||
// FIXME: Still only gets a black picture back
|
|
||||||
if (frame_gl_cb)
|
if (frame_gl_cb)
|
||||||
frame_gl_cb(androidcamera->tex,
|
frame_gl_cb(androidcamera->tex,
|
||||||
GL_TEXTURE_EXTERNAL_OES,
|
GL_TEXTURE_EXTERNAL_OES,
|
||||||
|
|
Loading…
Reference in New Issue