mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Remove separate audio / video null driver files
This commit is contained in:
parent
3eba8da4e9
commit
a986b71947
@ -245,9 +245,7 @@ OBJ += \
|
||||
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.o \
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o \
|
||||
wifi/drivers/nullwifi.o \
|
||||
gfx/drivers/nullgfx.o \
|
||||
gfx/display_servers/dispserv_null.o \
|
||||
audio/drivers/nullaudio.o \
|
||||
input/drivers/nullinput.o \
|
||||
input/drivers_hid/null_hid.o \
|
||||
input/drivers_joypad/null_joypad.o \
|
||||
|
@ -1,96 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
static void *null_audio_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
RARCH_ERR("Using the null audio driver. RetroArch will be silent.\n");
|
||||
|
||||
(void)device;
|
||||
(void)rate;
|
||||
(void)latency;
|
||||
(void)new_rate;
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static void null_audio_free(void *data)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static ssize_t null_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
(void)data;
|
||||
(void)buf;
|
||||
|
||||
return size;
|
||||
}
|
||||
|
||||
static bool null_audio_stop(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool null_audio_alive(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool null_audio_start(void *data, bool is_shutdown)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void null_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
(void)data;
|
||||
(void)state;
|
||||
}
|
||||
|
||||
static bool null_audio_use_float(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static size_t null_audio_write_avail(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return 0;
|
||||
}
|
||||
|
||||
audio_driver_t audio_null = {
|
||||
null_audio_init,
|
||||
null_audio_write,
|
||||
null_audio_stop,
|
||||
null_audio_start,
|
||||
null_audio_alive,
|
||||
null_audio_set_nonblock_state,
|
||||
null_audio_free,
|
||||
null_audio_use_float,
|
||||
"null",
|
||||
NULL,
|
||||
NULL,
|
||||
null_audio_write_avail,
|
||||
NULL
|
||||
};
|
@ -1,146 +0,0 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#include "../../driver.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
static void *null_gfx_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
RARCH_ERR("Using the null video driver. RetroArch will not be visible.");
|
||||
|
||||
*input = NULL;
|
||||
*input_data = NULL;
|
||||
(void)video;
|
||||
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static bool null_gfx_frame(void *data, const void *frame,
|
||||
unsigned width, unsigned height, uint64_t frame_count,
|
||||
unsigned pitch, const char *msg, video_frame_info_t *video_info)
|
||||
{
|
||||
(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;
|
||||
}
|
||||
|
||||
static bool null_gfx_suppress_screensaver(void *data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool null_gfx_has_windowed(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void null_gfx_free(void *data)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
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,
|
||||
struct video_viewport *vp)
|
||||
{
|
||||
(void)data;
|
||||
(void)vp;
|
||||
}
|
||||
|
||||
static bool null_gfx_read_viewport(void *data, uint8_t *buffer, bool is_idle)
|
||||
{
|
||||
(void)data;
|
||||
(void)buffer;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static void null_gfx_get_poke_interface(void *data,
|
||||
const video_poke_interface_t **iface)
|
||||
{
|
||||
(void)data;
|
||||
(void)iface;
|
||||
}
|
||||
|
||||
video_driver_t video_null = {
|
||||
null_gfx_init,
|
||||
null_gfx_frame,
|
||||
null_gfx_set_nonblock_state,
|
||||
null_gfx_alive,
|
||||
null_gfx_focus,
|
||||
null_gfx_suppress_screensaver,
|
||||
null_gfx_has_windowed,
|
||||
null_gfx_set_shader,
|
||||
null_gfx_free,
|
||||
"null",
|
||||
NULL, /* set_viewport */
|
||||
null_gfx_set_rotation,
|
||||
null_gfx_viewport_info,
|
||||
null_gfx_read_viewport,
|
||||
NULL, /* read_frame_raw */
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
NULL, /* overlay_interface */
|
||||
#endif
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
NULL,
|
||||
#endif
|
||||
null_gfx_get_poke_interface,
|
||||
};
|
@ -499,7 +499,6 @@ VIDEO DRIVER
|
||||
#elif defined(DJGPP)
|
||||
#include "../gfx/drivers/vga_gfx.c"
|
||||
#endif
|
||||
#include "../gfx/drivers/nullgfx.c"
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
|
||||
#ifdef HAVE_GDI
|
||||
@ -892,8 +891,6 @@ AUDIO
|
||||
#include "../audio/drivers/coreaudio.c"
|
||||
#endif
|
||||
|
||||
#include "../audio/drivers/nullaudio.c"
|
||||
|
||||
#if defined(HAVE_WASAPI) || ((_WIN32_WINNT >= 0x0602) && !defined(__WINRT__))
|
||||
#include "../audio/common/mmdevice_common.c"
|
||||
#endif
|
||||
|
41
retroarch.c
41
retroarch.c
@ -254,7 +254,21 @@
|
||||
| DRIVER_LED_MASK \
|
||||
| DRIVER_MIDI_MASK )
|
||||
|
||||
|
||||
static audio_driver_t audio_null = {
|
||||
NULL, /* init */
|
||||
NULL, /* write */
|
||||
NULL, /* stop */
|
||||
NULL, /* start */
|
||||
NULL, /* alive */
|
||||
NULL, /* set_nonblock_state */
|
||||
NULL, /* free */
|
||||
NULL, /* use_float */
|
||||
"null",
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, /* write_avail */
|
||||
NULL
|
||||
};
|
||||
|
||||
static const audio_driver_t *audio_drivers[] = {
|
||||
#ifdef HAVE_ALSA
|
||||
@ -345,6 +359,31 @@ static const audio_driver_t *audio_drivers[] = {
|
||||
NULL,
|
||||
};
|
||||
|
||||
static video_driver_t video_null = {
|
||||
NULL, /* init */
|
||||
NULL, /* frame */
|
||||
NULL, /* set_nonblock_state */
|
||||
NULL, /* alive */
|
||||
NULL, /* focus */
|
||||
NULL, /* suppress_screensaver */
|
||||
NULL, /* has_windowed */
|
||||
NULL, /* set_shader */
|
||||
NULL, /* free */
|
||||
"null",
|
||||
NULL, /* set_viewport */
|
||||
NULL, /* set_rotation */
|
||||
NULL, /* viewport_info */
|
||||
NULL, /* read_viewport */
|
||||
NULL, /* read_frame_raw */
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
NULL, /* overlay_interface */
|
||||
#endif
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
NULL,
|
||||
#endif
|
||||
NULL, /* get_poke_interface */
|
||||
};
|
||||
|
||||
static const video_driver_t *video_drivers[] = {
|
||||
#ifdef HAVE_VITA2D
|
||||
|
@ -610,7 +610,6 @@ extern audio_driver_t audio_switch_thread;
|
||||
extern audio_driver_t audio_switch_libnx_audren;
|
||||
extern audio_driver_t audio_switch_libnx_audren_thread;
|
||||
extern audio_driver_t audio_rwebaudio;
|
||||
extern audio_driver_t audio_null;
|
||||
|
||||
/* Recording */
|
||||
|
||||
@ -1900,7 +1899,6 @@ extern video_driver_t video_vga;
|
||||
extern video_driver_t video_fpga;
|
||||
extern video_driver_t video_sixel;
|
||||
extern video_driver_t video_network;
|
||||
extern video_driver_t video_null;
|
||||
|
||||
extern const gfx_ctx_driver_t gfx_ctx_osmesa;
|
||||
extern const gfx_ctx_driver_t gfx_ctx_sdl_gl;
|
||||
|
Loading…
x
Reference in New Issue
Block a user