2014-10-07 12:31:10 +00:00
|
|
|
/* RetroArch - A frontend for libretro.
|
|
|
|
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
2017-01-22 12:40:32 +00:00
|
|
|
* Copyright (C) 2011-2017 - Daniel De Matteis
|
2017-12-12 07:55:31 +00:00
|
|
|
*
|
2014-10-07 12:31:10 +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-06-26 15:46:13 +00:00
|
|
|
/* Null context. */
|
2014-10-07 12:31:10 +00:00
|
|
|
|
2019-06-17 13:10:22 +00:00
|
|
|
#include "../../retroarch.h"
|
2014-10-07 12:31:10 +00:00
|
|
|
|
2018-09-11 22:07:43 +00:00
|
|
|
static void gfx_ctx_null_swap_interval(void *data, int interval)
|
2014-10-07 12:31:10 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)interval;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_check_window(void *data, bool *quit,
|
2017-01-23 00:02:33 +00:00
|
|
|
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
|
2014-10-07 12:31:10 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)quit;
|
|
|
|
(void)width;
|
|
|
|
(void)height;
|
|
|
|
(void)resize;
|
|
|
|
}
|
|
|
|
|
2017-05-19 01:34:53 +00:00
|
|
|
static void gfx_ctx_null_swap_buffers(void *data, void *data2)
|
2014-10-07 12:31:10 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
*width = 320;
|
|
|
|
*height = 240;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool gfx_ctx_null_set_video_mode(void *data,
|
2017-01-18 16:41:27 +00:00
|
|
|
video_frame_info_t *video_info,
|
2014-10-07 12:31:10 +00:00
|
|
|
unsigned width, unsigned height,
|
|
|
|
bool fullscreen)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)width;
|
|
|
|
(void)height;
|
|
|
|
(void)fullscreen;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_destroy(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
}
|
|
|
|
|
2017-12-12 07:55:31 +00:00
|
|
|
static void gfx_ctx_null_input_driver(void *data,
|
2017-01-15 23:13:57 +00:00
|
|
|
const char *name,
|
2019-07-27 00:21:24 +00:00
|
|
|
input_driver_t **input, void **input_data)
|
2014-10-07 12:31:10 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)input;
|
|
|
|
(void)input_data;
|
|
|
|
}
|
|
|
|
|
|
|
|
static bool gfx_ctx_null_has_focus(void *data)
|
|
|
|
{
|
|
|
|
(void)data;
|
2014-10-08 15:23:02 +00:00
|
|
|
return true;
|
|
|
|
}
|
2014-10-07 12:31:10 +00:00
|
|
|
|
2015-01-18 21:32:14 +00:00
|
|
|
static bool gfx_ctx_null_suppress_screensaver(void *data, bool enable)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)enable;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-03-01 20:16:54 +00:00
|
|
|
static enum gfx_ctx_api gfx_ctx_null_get_api(void *data)
|
|
|
|
{
|
|
|
|
return GFX_CTX_NONE;
|
|
|
|
}
|
|
|
|
|
2014-10-07 12:31:10 +00:00
|
|
|
static bool gfx_ctx_null_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)api;
|
|
|
|
(void)major;
|
|
|
|
(void)minor;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_show_mouse(void *data, bool state)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)state;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_bind_hw_render(void *data, bool enable)
|
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
(void)enable;
|
|
|
|
}
|
|
|
|
|
2017-01-22 17:29:22 +00:00
|
|
|
static void *gfx_ctx_null_init(video_frame_info_t *video_info, void *video_driver)
|
2014-10-07 12:31:10 +00:00
|
|
|
{
|
2015-12-08 15:18:57 +00:00
|
|
|
(void)video_driver;
|
2014-10-07 12:31:10 +00:00
|
|
|
|
2015-12-08 15:18:57 +00:00
|
|
|
return (void*)"null";
|
2014-10-07 12:31:10 +00:00
|
|
|
}
|
|
|
|
|
2016-05-05 03:35:35 +00:00
|
|
|
static uint32_t gfx_ctx_null_get_flags(void *data)
|
2016-05-05 15:35:28 +00:00
|
|
|
{
|
|
|
|
uint32_t flags = 0;
|
|
|
|
|
|
|
|
return flags;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void gfx_ctx_null_set_flags(void *data, uint32_t flags)
|
2016-05-05 03:35:35 +00:00
|
|
|
{
|
|
|
|
(void)data;
|
|
|
|
}
|
|
|
|
|
2014-10-07 12:31:10 +00:00
|
|
|
const gfx_ctx_driver_t gfx_ctx_null = {
|
|
|
|
gfx_ctx_null_init,
|
|
|
|
gfx_ctx_null_destroy,
|
2018-03-01 20:16:54 +00:00
|
|
|
gfx_ctx_null_get_api,
|
2014-10-07 12:31:10 +00:00
|
|
|
gfx_ctx_null_bind_api,
|
|
|
|
gfx_ctx_null_swap_interval,
|
|
|
|
gfx_ctx_null_set_video_mode,
|
|
|
|
gfx_ctx_null_get_video_size,
|
2018-04-15 22:38:00 +00:00
|
|
|
NULL, /* get_refresh_rate */
|
2015-02-24 20:36:23 +00:00
|
|
|
NULL, /* get_video_output_size */
|
|
|
|
NULL, /* get_video_output_prev */
|
|
|
|
NULL, /* get_video_output_next */
|
2015-04-08 18:10:30 +00:00
|
|
|
NULL, /* get_metrics */
|
2015-02-24 18:58:14 +00:00
|
|
|
NULL,
|
2017-01-19 00:58:44 +00:00
|
|
|
NULL, /* update_title */
|
2014-10-07 12:31:10 +00:00
|
|
|
gfx_ctx_null_check_window,
|
2017-01-19 13:31:57 +00:00
|
|
|
NULL, /* set_resize */
|
2014-10-07 12:31:10 +00:00
|
|
|
gfx_ctx_null_has_focus,
|
2015-01-18 21:32:14 +00:00
|
|
|
gfx_ctx_null_suppress_screensaver,
|
2019-07-26 04:23:20 +00:00
|
|
|
false, /* has_windowed */
|
2014-10-07 12:31:10 +00:00
|
|
|
gfx_ctx_null_swap_buffers,
|
|
|
|
gfx_ctx_null_input_driver,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
NULL,
|
|
|
|
gfx_ctx_null_show_mouse,
|
|
|
|
"null",
|
2016-05-05 03:35:35 +00:00
|
|
|
gfx_ctx_null_get_flags,
|
2016-05-05 15:35:28 +00:00
|
|
|
gfx_ctx_null_set_flags,
|
2016-08-31 13:02:07 +00:00
|
|
|
gfx_ctx_null_bind_hw_render,
|
|
|
|
NULL,
|
|
|
|
NULL
|
2014-10-07 12:31:10 +00:00
|
|
|
};
|