Expose the wifi driver scan callback

This commit is contained in:
Jean-André Santoni 2016-09-21 21:58:15 +02:00 committed by twinaphex
parent 36fb1ffcdf
commit acf34990fc
2 changed files with 15 additions and 4 deletions

View File

@ -29,6 +29,11 @@
#include "../list_special.h"
#include "../verbosity.h"
static const wifi_driver_t *wifi_driver = NULL;
static void *wifi_data = NULL;
static bool wifi_driver_active = false;
static bool wifi_driver_data_own = false;
static const wifi_driver_t *wifi_drivers[] = {
#ifdef HAVE_LAKKA
&wifi_connmanctl,
@ -91,13 +96,17 @@ bool driver_wifi_start(void)
return wifi_driver_ctl(RARCH_WIFI_CTL_START, NULL);
}
void driver_wifi_scan(struct string_list *list)
{
if (wifi_driver && wifi_data && wifi_driver->scan)
{
return wifi_driver->scan(wifi_data, list);
}
}
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data)
{
settings_t *settings = config_get_ptr();
static const wifi_driver_t *wifi_driver = NULL;
static void *wifi_data = NULL;
static bool wifi_driver_active = false;
static bool wifi_driver_data_own = false;
switch (state)
{

View File

@ -94,6 +94,8 @@ void driver_wifi_stop(void);
bool driver_wifi_start(void);
void driver_wifi_scan(struct string_list *list);
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data);
RETRO_END_DECLS