diff --git a/Makefile.common b/Makefile.common index 010d63073d..e1b1d66151 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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 \ diff --git a/gfx/display_servers/dispserv_null.c b/gfx/display_servers/dispserv_null.c deleted file mode 100644 index c34eb1099e..0000000000 --- a/gfx/display_servers/dispserv_null.c +++ /dev/null @@ -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 . - */ - -#include -#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" -}; diff --git a/gfx/video_display_server.c b/gfx/video_display_server.c index e8827291fa..c6ed30c110 100644 --- a/gfx/video_display_server.c +++ b/gfx/video_display_server.c @@ -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; diff --git a/gfx/video_display_server.h b/gfx/video_display_server.h index ee9aed210d..74866e793c 100644 --- a/gfx/video_display_server.h +++ b/gfx/video_display_server.h @@ -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 diff --git a/griffin/griffin.c b/griffin/griffin.c index 28a86e2c54..4096da0439 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -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 diff --git a/retroarch.c b/retroarch.c index e654335c6a..71675a6565 100644 --- a/retroarch.c +++ b/retroarch.c @@ -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) diff --git a/wifi/drivers/nullwifi.c b/wifi/drivers/nullwifi.c deleted file mode 100644 index 1488d822db..0000000000 --- a/wifi/drivers/nullwifi.c +++ /dev/null @@ -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 . - */ - -#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", -}; diff --git a/wifi/wifi_driver.h b/wifi/wifi_driver.h index 898d6fa806..9df738d29f 100644 --- a/wifi/wifi_driver.h +++ b/wifi/wifi_driver.h @@ -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: