From b62476da77a6dc5aef52a9c5208f28efa995a351 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 18 Jun 2019 22:18:11 +0200 Subject: [PATCH] Revert "Turn wifi_driver_ctl into a static function" This reverts commit 8a5ae0b6cf990680b403d9404cb6d43b1c507c33. --- retroarch.c | 63 +++++++++++++++++++++++----------------------- wifi/wifi_driver.h | 2 ++ 2 files changed, 33 insertions(+), 32 deletions(-) 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