diff --git a/camera/nullcamera.c b/camera/nullcamera.c index d44910976c..736bff261f 100644 --- a/camera/nullcamera.c +++ b/camera/nullcamera.c @@ -15,7 +15,8 @@ #include "../driver.h" -static void *nullcamera_init(const char *device, uint64_t caps, unsigned width, unsigned height) +static void *nullcamera_init(const char *device, uint64_t caps, + unsigned width, unsigned height) { (void)device; return (void*)-1; @@ -23,20 +24,28 @@ static void *nullcamera_init(const char *device, uint64_t caps, unsigned width, static void nullcamera_free(void *data) { + (void)data; } static bool nullcamera_start(void *data) { + (void)data; return true; } static void nullcamera_stop(void *data) { + (void)data; } -static bool nullcamera_poll(void *data, retro_camera_frame_raw_framebuffer_t frame_raw_cb, +static bool nullcamera_poll(void *data, + retro_camera_frame_raw_framebuffer_t frame_raw_cb, retro_camera_frame_opengl_texture_t frame_gl_cb) { + (void)data; + (void)frame_raw_cb; + (void)frame_gl_cb; + return true; } diff --git a/camera/rwebcam.c b/camera/rwebcam.c index 26fcb5b355..0eae208b69 100644 --- a/camera/rwebcam.c +++ b/camera/rwebcam.c @@ -16,7 +16,8 @@ #include "../driver.h" #include "../emscripten/RWebCam.h" -static void *rwebcam_init(const char *device, uint64_t caps, unsigned width, unsigned height) +static void *rwebcam_init(const char *device, uint64_t caps, + unsigned width, unsigned height) { (void)device; return RWebCamInit(caps, width, height); @@ -37,7 +38,8 @@ static void rwebcam_stop(void *data) RWebCamStop(data); } -static bool rwebcam_poll(void *data, retro_camera_frame_raw_framebuffer_t frame_raw_cb, +static bool rwebcam_poll(void *data, + retro_camera_frame_raw_framebuffer_t frame_raw_cb, retro_camera_frame_opengl_texture_t frame_gl_cb) { return RWebCamPoll(data, frame_raw_cb, frame_gl_cb); diff --git a/camera/video4linux2.c b/camera/video4linux2.c index 928c090902..72d4347492 100644 --- a/camera/video4linux2.c +++ b/camera/video4linux2.c @@ -96,15 +96,10 @@ static bool init_mmap(void *data) if (xioctl(v4l->fd, VIDIOC_REQBUFS, &req) == -1) { if (errno == EINVAL) - { RARCH_ERR("%s does not support memory mapping.\n", v4l->dev_name); - return false; - } else - { RARCH_ERR("xioctl of VIDIOC_REQBUFS failed.\n"); - return false; - } + return false; } if (req.count < 2) @@ -164,15 +159,10 @@ static bool init_device(void *data) if (xioctl(v4l->fd, VIDIOC_QUERYCAP, &cap) < 0) { if (errno == EINVAL) - { RARCH_ERR("%s is no V4L2 device.\n", v4l->dev_name); - return false; - } else - { RARCH_ERR("Error - VIDIOC_QUERYCAP.\n"); - return false; - } + return false; } if (!(cap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) @@ -430,8 +420,8 @@ static bool v4l_poll(void *data, v4l->height, v4l->width * 4); return true; } - else - return false; + + return false; } camera_driver_t camera_v4l2 = {