Revert "Remove led_null.c"

This reverts commit bef72a19d06f87f1e53da87d400c1d7948f344a3.
This commit is contained in:
twinaphex 2020-01-06 16:22:11 +01:00
parent bbd1e6a6a5
commit 2ad394148a
5 changed files with 31 additions and 7 deletions

View File

@ -207,6 +207,7 @@ OBJ += \
input/common/input_hid_common.o \
input/input_mapper.o \
led/led_driver.o \
led/drivers/led_null.o \
gfx/video_coord_array.o \
gfx/video_display_server.o \
gfx/video_crt_switch.o \

View File

@ -797,6 +797,8 @@ LEDS
#include "../led/led_driver.c"
#include "../led/drivers/led_null.c"
#if defined(HAVE_RPILED)
#include "../led/drivers/led_rpi.c"
#endif

27
led/drivers/led_null.c Normal file
View File

@ -0,0 +1,27 @@
/* RetroArch - A frontend for libretro.
*
* 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 "../led_driver.h"
#include "../../verbosity.h"
static void null_led_init(void) { }
static void null_led_free(void) { }
static void null_led_set(int led, int state) { }
const led_driver_t null_led_driver = {
null_led_init,
null_led_free,
null_led_set,
"null"
};

View File

@ -21,13 +21,6 @@
static const led_driver_t *current_led_driver = NULL;
static const led_driver_t null_led_driver = {
NULL, /* init */
NULL, /* free */
NULL, /* set */
"null"
};
bool led_driver_init(void)
{
settings_t *settings = config_get_ptr();

View File

@ -41,6 +41,7 @@ void led_driver_free(void);
void led_driver_set_led(int led, int value);
extern const led_driver_t null_led_driver;
extern const led_driver_t overlay_led_driver;
extern const led_driver_t rpi_led_driver;