2012-06-19 22:44:40 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
2014-01-01 00:50:59 +00:00
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2015-01-07 17:06:50 +00:00
|
|
|
* Copyright (C) 2011-2015 - Daniel De Matteis
|
2012-06-19 22:44:40 +00:00
|
|
|
*
|
|
|
|
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
|
|
|
* of the GNU General Public License as published by the Free Software Found-
|
|
|
|
* ation, either version 3 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
|
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE. See the GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with RetroArch.
|
|
|
|
* If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2015-01-12 05:45:12 +00:00
|
|
|
#include "../../general.h"
|
|
|
|
#include "../../driver.h"
|
2012-06-19 22:44:40 +00:00
|
|
|
|
|
|
|
static void *null_gfx_init(const video_info_t *video,
|
|
|
|
const input_driver_t **input, void **input_data)
|
|
|
|
{
|
2015-11-23 18:42:31 +00:00
|
|
|
RARCH_ERR("Using the null video driver. RetroArch will not be visible.");
|
|
|
|
|
2012-06-19 22:44:40 +00:00
|
|
|
*input = NULL;
|
|
|
|
*input_data = NULL;
|
|
|
|
(void)video;
|
|
|
|
|
|
|
|
return (void*)-1;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool null_gfx_frame(void *data, const void *frame,
|
2015-08-03 21:01:07 +00:00
|
|
|
unsigned width, unsigned height, uint64_t frame_count,
|
|
|
|
unsigned pitch, const char *msg)
|
2012-06-19 22:44:40 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)frame;
|
|
|
|
(void)width;
|
|
|
|
(void)height;
|
|
|
|
(void)pitch;
|
|
|
|
(void)msg;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void null_gfx_set_nonblock_state(void *data, bool toggle)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)toggle;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool null_gfx_alive(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool null_gfx_focus(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2015-01-18 21:32:14 +00:00
|
|
|
static bool null_gfx_suppress_screensaver(void *data, bool enable)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)enable;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2014-10-08 15:23:02 +00:00
|
|
|
static bool null_gfx_has_windowed(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2012-06-19 22:44:40 +00:00
|
|
|
static void null_gfx_free(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
}
|
|
|
|
|
2014-09-09 18:18:06 +00:00
|
|
|
static bool null_gfx_set_shader(void *data,
|
|
|
|
enum rarch_shader_type type, const char *path)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)type;
|
|
|
|
(void)path;
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void null_gfx_set_rotation(void *data,
|
|
|
|
unsigned rotation)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)rotation;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void null_gfx_viewport_info(void *data,
|
2015-02-14 04:52:05 +00:00
|
|
|
struct video_viewport *vp)
|
2014-09-09 18:18:06 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)vp;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool null_gfx_read_viewport(void *data, uint8_t *buffer)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)buffer;
|
|
|
|
|
2014-09-09 20:41:04 +00:00
|
|
|
return true;
|
2014-09-09 18:18:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void null_gfx_get_poke_interface(void *data,
|
|
|
|
const video_poke_interface_t **iface)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)iface;
|
|
|
|
}
|
|
|
|
|
2014-09-11 05:06:20 +00:00
|
|
|
video_driver_t video_null = {
|
2012-06-19 22:44:40 +00:00
|
|
|
null_gfx_init,
|
|
|
|
null_gfx_frame,
|
|
|
|
null_gfx_set_nonblock_state,
|
|
|
|
null_gfx_alive,
|
|
|
|
null_gfx_focus,
|
2015-01-18 21:32:14 +00:00
|
|
|
null_gfx_suppress_screensaver,
|
2014-10-08 15:23:02 +00:00
|
|
|
null_gfx_has_windowed,
|
2014-09-09 18:18:06 +00:00
|
|
|
null_gfx_set_shader,
|
2012-06-19 22:44:40 +00:00
|
|
|
null_gfx_free,
|
|
|
|
"null",
|
2015-04-26 17:46:59 +00:00
|
|
|
NULL, /* set_viewport */
|
2014-09-09 18:18:06 +00:00
|
|
|
null_gfx_set_rotation,
|
|
|
|
null_gfx_viewport_info,
|
|
|
|
null_gfx_read_viewport,
|
2015-03-16 08:33:16 +00:00
|
|
|
NULL, /* read_frame_raw */
|
2012-07-08 15:29:09 +00:00
|
|
|
|
2014-09-09 18:18:06 +00:00
|
|
|
#ifdef HAVE_OVERLAY
|
|
|
|
NULL, /* overlay_interface */
|
|
|
|
#endif
|
|
|
|
null_gfx_get_poke_interface,
|
2012-06-19 22:44:40 +00:00
|
|
|
};
|