mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-31 16:52:45 +00:00
WiFi driver: add scan callback
This commit is contained in:
parent
39be71e4ad
commit
36fb1ffcdf
@ -14,6 +14,7 @@
|
||||
*/
|
||||
|
||||
#include "../wifi_driver.h"
|
||||
#include <file/file_path.h>
|
||||
|
||||
static void *connmanctl_init(const char *device, uint64_t caps,
|
||||
unsigned width, unsigned height)
|
||||
@ -38,10 +39,21 @@ static void connmanctl_stop(void *data)
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void connmanctl_scan(void *data, struct string_list *list)
|
||||
{
|
||||
(void)data;
|
||||
|
||||
union string_list_elem_attr attr;
|
||||
attr.i = RARCH_FILETYPE_UNSET;
|
||||
|
||||
string_list_append(list, "LALA", attr);
|
||||
}
|
||||
|
||||
wifi_driver_t wifi_connmanctl = {
|
||||
connmanctl_init,
|
||||
connmanctl_free,
|
||||
connmanctl_start,
|
||||
connmanctl_stop,
|
||||
connmanctl_scan,
|
||||
"connmanctl",
|
||||
};
|
||||
|
@ -38,10 +38,16 @@ static void nullwifi_stop(void *data)
|
||||
(void)data;
|
||||
}
|
||||
|
||||
static void nullwifi_scan(void *data, struct string_list *list)
|
||||
{
|
||||
(void)data;
|
||||
}
|
||||
|
||||
wifi_driver_t wifi_null = {
|
||||
nullwifi_init,
|
||||
nullwifi_free,
|
||||
nullwifi_start,
|
||||
nullwifi_stop,
|
||||
nullwifi_scan,
|
||||
"null",
|
||||
};
|
||||
|
@ -175,9 +175,6 @@ bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data)
|
||||
{
|
||||
if (settings->wifi.allow)
|
||||
return wifi_driver->start(wifi_data);
|
||||
|
||||
runloop_msg_queue_push(
|
||||
"Camera is explicitly disabled.\n", 1, 180, false);
|
||||
}
|
||||
return false;
|
||||
case RARCH_WIFI_CTL_SET_CB:
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <boolean.h>
|
||||
#include <retro_common_api.h>
|
||||
#include <libretro.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
@ -52,6 +53,8 @@ typedef struct wifi_driver
|
||||
bool (*start)(void *data);
|
||||
void (*stop)(void *data);
|
||||
|
||||
void (*scan)(void *data, struct string_list *list);
|
||||
|
||||
const char *ident;
|
||||
} wifi_driver_t;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user