Get rid of separate null midi driver file and display server file

This commit is contained in:
twinaphex 2020-01-06 16:06:42 +01:00
parent bef72a19d0
commit bbd1e6a6a5
8 changed files with 29 additions and 140 deletions

View File

@ -242,8 +242,6 @@ OBJ += \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \
$(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.o \
$(LIBRETRO_COMM_DIR)/utils/md5.o \
wifi/drivers/nullwifi.o \
gfx/display_servers/dispserv_null.o \
playlist.o \
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
performance_counters.o \

View File

@ -1,59 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2019 - Brad Parker
*
* 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 <stddef.h>
#include "../video_display_server.h"
static void* null_display_server_init(void)
{
return NULL;
}
static void null_display_server_destroy(void *data)
{
(void)data;
}
static bool null_display_server_set_window_opacity(void *data, unsigned opacity)
{
(void)data;
(void)opacity;
return true;
}
static bool null_display_server_set_window_progress(void *data, int progress, bool finished)
{
(void)data;
(void)progress;
(void)finished;
return true;
}
const video_display_server_t dispserv_null = {
null_display_server_init,
null_display_server_destroy,
null_display_server_set_window_opacity,
null_display_server_set_window_progress,
NULL, /* set_window_decorations */
NULL, /* set_resolution */
NULL, /* get_resolution_list */
NULL, /* get_output_options */
NULL, /* set_screen_orientation */
NULL, /* get_screen_orientation */
NULL, /* get_flags */
"null"
};

View File

@ -20,6 +20,21 @@
#include "../retroarch.h"
#include "../verbosity.h"
static const video_display_server_t dispserv_null = {
NULL, /* init */
NULL, /* destroy */
NULL, /* set_window_opacity */
NULL, /* set_window_progress */
NULL, /* set_window_decorations */
NULL, /* set_resolution */
NULL, /* get_resolution_list */
NULL, /* get_output_options */
NULL, /* set_screen_orientation */
NULL, /* get_screen_orientation */
NULL, /* get_flags */
"null"
};
static const video_display_server_t *current_display_server = &dispserv_null;
static void *current_display_server_data = NULL;
static enum rotation initial_screen_orientation = ORIENTATION_NORMAL;

View File

@ -92,7 +92,6 @@ enum rotation video_display_server_get_screen_orientation(void);
extern const video_display_server_t dispserv_win32;
extern const video_display_server_t dispserv_x11;
extern const video_display_server_t dispserv_android;
extern const video_display_server_t dispserv_null;
RETRO_END_DECLS

View File

@ -445,8 +445,6 @@ VIDEO DRIVER
#include "../gfx/drivers/drm_gfx.c"
#endif
#include "../gfx/display_servers/dispserv_null.c"
#ifdef HAVE_OPENGL1
#include "../gfx/drivers/gl1.c"
#endif
@ -1126,8 +1124,6 @@ RETROARCH
/*============================================================
WIFI
============================================================ */
#include "../wifi/drivers/nullwifi.c"
#ifdef HAVE_LAKKA
#include "../wifi/drivers/connmanctl.c"
#endif

View File

@ -789,6 +789,19 @@ static hid_driver_t *hid_drivers[] = {
};
#endif
static wifi_driver_t wifi_null = {
NULL, /* init */
NULL, /* free */
NULL, /* start */
NULL, /* stop */
NULL, /* scan */
NULL, /* get_ssids */
NULL, /* ssid_is_online */
NULL, /* connect_ssid */
NULL, /* tether_start_stop */
"null",
};
static const wifi_driver_t *wifi_drivers[] = {
#ifdef HAVE_LAKKA
&wifi_connmanctl,
@ -866,9 +879,9 @@ static const record_driver_t *record_drivers[] = {
NULL,
};
extern midi_driver_t midi_null;
extern midi_driver_t midi_winmm;
extern midi_driver_t midi_alsa;
extern midi_driver_t midi_null;
static midi_driver_t *midi_drivers[] = {
#if defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM)

View File

@ -1,72 +0,0 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2017 - Jean-André Santoni
*
* 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 "../wifi_driver.h"
static void *nullwifi_init(void)
{
return (void*)-1;
}
static void nullwifi_free(void *data)
{
(void)data;
}
static bool nullwifi_start(void *data)
{
(void)data;
return true;
}
static void nullwifi_stop(void *data)
{
(void)data;
}
static void nullwifi_scan(void)
{
}
static void nullwifi_get_ssids(struct string_list* ssids)
{
}
static bool nullwifi_ssid_is_online(unsigned i)
{
return false;
}
static bool nullwifi_connect_ssid(unsigned i, const char* passphrase)
{
return false;
}
static void nullwifi_tether_start_stop(bool start, char* configfile)
{
}
wifi_driver_t wifi_null = {
nullwifi_init,
nullwifi_free,
nullwifi_start,
nullwifi_stop,
nullwifi_scan,
nullwifi_get_ssids,
nullwifi_ssid_is_online,
nullwifi_connect_ssid,
nullwifi_tether_start_stop,
"null",
};

View File

@ -60,7 +60,6 @@ typedef struct wifi_driver
} wifi_driver_t;
extern wifi_driver_t wifi_connmanctl;
extern wifi_driver_t wifi_null;
/**
* config_get_wifi_driver_options: