(camera) Style nits

This commit is contained in:
twinaphex 2014-09-13 02:27:34 +02:00
parent d32f63b6ed
commit 64e77f1224
3 changed files with 19 additions and 18 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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 = {