mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 00:32:49 +00:00
(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")
|
||||
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()
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user