diff --git a/retroarch.c b/retroarch.c index 1cd1d6726f..1ab9abd298 100644 --- a/retroarch.c +++ b/retroarch.c @@ -439,7 +439,37 @@ const char* config_get_wifi_driver_options(void) return char_list_new_special(STRING_LIST_WIFI_DRIVERS, NULL); } -static bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data) +void driver_wifi_stop(void) +{ + wifi_driver_ctl(RARCH_WIFI_CTL_START, NULL); +} + +bool driver_wifi_start(void) +{ + return wifi_driver_ctl(RARCH_WIFI_CTL_START, NULL); +} + +void driver_wifi_scan() +{ + wifi_driver->scan(); +} + +void driver_wifi_get_ssids(struct string_list* ssids) +{ + wifi_driver->get_ssids(ssids); +} + +bool driver_wifi_ssid_is_online(unsigned i) +{ + return wifi_driver->ssid_is_online(i); +} + +bool driver_wifi_connect_ssid(unsigned i, const char* passphrase) +{ + return wifi_driver->connect_ssid(i, passphrase); +} + +bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data) { settings_t *settings = configuration_settings; @@ -547,37 +577,6 @@ static bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data) return false; } - -void driver_wifi_stop(void) -{ - wifi_driver_ctl(RARCH_WIFI_CTL_START, NULL); -} - -bool driver_wifi_start(void) -{ - return wifi_driver_ctl(RARCH_WIFI_CTL_START, NULL); -} - -void driver_wifi_scan() -{ - wifi_driver->scan(); -} - -void driver_wifi_get_ssids(struct string_list* ssids) -{ - wifi_driver->get_ssids(ssids); -} - -bool driver_wifi_ssid_is_online(unsigned i) -{ - return wifi_driver->ssid_is_online(i); -} - -bool driver_wifi_connect_ssid(unsigned i, const char* passphrase) -{ - return wifi_driver->connect_ssid(i, passphrase); -} - /* UI Companion */ static const ui_companion_driver_t *ui_companion_drivers[] = { diff --git a/wifi/wifi_driver.h b/wifi/wifi_driver.h index bdd685ebf7..586f9c4079 100644 --- a/wifi/wifi_driver.h +++ b/wifi/wifi_driver.h @@ -102,6 +102,8 @@ bool driver_wifi_ssid_is_online(unsigned i); bool driver_wifi_connect_ssid(unsigned i, const char* passphrase); +bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data); + RETRO_END_DECLS #endif