From 0381cf1ffe1f8df935d91576c7c1f7cee84a2f4f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 18 Nov 2013 01:55:22 +0100 Subject: [PATCH] (Android) Camera - caps passed to int should contain RETRO_CAMERA_BUFFER_OPENGL_TEXTURE --- camera/android.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/camera/android.c b/camera/android.c index a73f0c39ea..55b35ed1ae 100644 --- a/camera/android.c +++ b/camera/android.c @@ -34,10 +34,15 @@ typedef struct android_camera static void *android_camera_init(const char *device, uint64_t caps, unsigned width, unsigned height) { (void)device; - (void)caps; (void)width; (void)height; + if ((caps & (1ULL << RETRO_CAMERA_BUFFER_OPENGL_TEXTURE)) == 0) + { + RARCH_ERR("androidcamera returns OpenGL texture.\n"); + return NULL; + } + struct android_app *android_app = (struct android_app*)g_android; androidcamera_t *androidcamera = (androidcamera_t*)calloc(1, sizeof(androidcamera_t)); if (!androidcamera)