commit
baeadb775e
|
@ -4172,7 +4172,7 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||||
case MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER:
|
case MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER:
|
||||||
return "Camera Driver";
|
return "Camera Driver";
|
||||||
case MENU_ENUM_LABEL_VALUE_WIFI_DRIVER:
|
case MENU_ENUM_LABEL_VALUE_WIFI_DRIVER:
|
||||||
return "WiFi Driver";
|
return "Wi-Fi Driver";
|
||||||
case MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER:
|
case MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER:
|
||||||
return "Location Driver";
|
return "Location Driver";
|
||||||
case MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE:
|
case MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE:
|
||||||
|
@ -4474,7 +4474,7 @@ const char *msg_hash_to_str_us(enum msg_hash_enums msg)
|
||||||
case MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS:
|
case MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS:
|
||||||
return "Network";
|
return "Network";
|
||||||
case MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS:
|
case MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS:
|
||||||
return "WiFi";
|
return "Wi-Fi";
|
||||||
case MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES:
|
case MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES:
|
||||||
return "Lakka Services";
|
return "Lakka Services";
|
||||||
case MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS:
|
case MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS:
|
||||||
|
|
|
@ -1489,6 +1489,17 @@ static void menu_input_st_cheat_cb(void *userdata, const char *str)
|
||||||
menu_input_dialog_end();
|
menu_input_dialog_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void menu_input_wifi_cb(void *userdata, const char *passphrase)
|
||||||
|
{
|
||||||
|
(void)userdata;
|
||||||
|
|
||||||
|
unsigned idx = menu_input_dialog_get_kb_idx();
|
||||||
|
|
||||||
|
driver_wifi_connect_ssid(idx, passphrase);
|
||||||
|
|
||||||
|
menu_input_dialog_end();
|
||||||
|
}
|
||||||
|
|
||||||
static int action_ok_cheat(const char *path,
|
static int action_ok_cheat(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
|
@ -2861,7 +2872,17 @@ static int action_ok_rdb_entry(const char *path,
|
||||||
static int action_ok_wifi(const char *path,
|
static int action_ok_wifi(const char *path,
|
||||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||||
{
|
{
|
||||||
driver_wifi_connect_ssid(idx);
|
|
||||||
|
menu_input_ctx_line_t line;
|
||||||
|
|
||||||
|
line.label = "Passphrase";
|
||||||
|
line.label_setting = label;
|
||||||
|
line.type = type;
|
||||||
|
line.idx = idx;
|
||||||
|
line.cb = menu_input_wifi_cb;
|
||||||
|
|
||||||
|
if (!menu_input_dialog_start(&line))
|
||||||
|
return -1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,6 +81,11 @@ unsigned menu_input_dialog_get_kb_type(void)
|
||||||
return menu_input_dialog_keyboard_type;
|
return menu_input_dialog_keyboard_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned menu_input_dialog_get_kb_idx(void)
|
||||||
|
{
|
||||||
|
return menu_input_dialog_keyboard_idx;
|
||||||
|
}
|
||||||
|
|
||||||
bool menu_input_dialog_get_display_kb(void)
|
bool menu_input_dialog_get_display_kb(void)
|
||||||
{
|
{
|
||||||
return menu_input_dialog_keyboard_display;
|
return menu_input_dialog_keyboard_display;
|
||||||
|
|
|
@ -45,6 +45,8 @@ const char *menu_input_dialog_get_buffer(void);
|
||||||
|
|
||||||
unsigned menu_input_dialog_get_kb_type(void);
|
unsigned menu_input_dialog_get_kb_type(void);
|
||||||
|
|
||||||
|
unsigned menu_input_dialog_get_kb_idx(void);
|
||||||
|
|
||||||
bool menu_input_dialog_start_search(void);
|
bool menu_input_dialog_start_search(void);
|
||||||
|
|
||||||
void menu_input_dialog_hide_kb(void);
|
void menu_input_dialog_hide_kb(void);
|
||||||
|
|
|
@ -91,7 +91,7 @@ static bool connmanctl_ssid_is_online(unsigned i)
|
||||||
return line[2] == 'O';
|
return line[2] == 'O';
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool connmanctl_connect_ssid(unsigned i)
|
static bool connmanctl_connect_ssid(unsigned i, const char* passphrase)
|
||||||
{
|
{
|
||||||
char ln[512];
|
char ln[512];
|
||||||
char service[128];
|
char service[128];
|
||||||
|
@ -101,6 +101,7 @@ static bool connmanctl_connect_ssid(unsigned i)
|
||||||
|
|
||||||
strlcpy(service, line+25, sizeof(service));
|
strlcpy(service, line+25, sizeof(service));
|
||||||
|
|
||||||
|
command[0] = '\0';
|
||||||
strlcat(command, "connmanctl connect ", sizeof(command));
|
strlcat(command, "connmanctl connect ", sizeof(command));
|
||||||
strlcat(command, service, sizeof(command));
|
strlcat(command, service, sizeof(command));
|
||||||
strlcat(command, " 2>&1", sizeof(command));
|
strlcat(command, " 2>&1", sizeof(command));
|
||||||
|
|
|
@ -49,7 +49,7 @@ static bool nullwifi_ssid_is_online(unsigned i)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool nullwifi_connect_ssid(unsigned i)
|
static bool nullwifi_connect_ssid(unsigned i, const char* passphrase)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,9 +111,9 @@ bool driver_wifi_ssid_is_online(unsigned i)
|
||||||
return wifi_driver->ssid_is_online(i);
|
return wifi_driver->ssid_is_online(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool driver_wifi_connect_ssid(unsigned i)
|
bool driver_wifi_connect_ssid(unsigned i, const char* passphrase)
|
||||||
{
|
{
|
||||||
return wifi_driver->connect_ssid(i);
|
return wifi_driver->connect_ssid(i, passphrase);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data)
|
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data)
|
||||||
|
|
|
@ -55,7 +55,7 @@ typedef struct wifi_driver
|
||||||
void (*scan)(void);
|
void (*scan)(void);
|
||||||
void (*get_ssids)(struct string_list *list);
|
void (*get_ssids)(struct string_list *list);
|
||||||
bool (*ssid_is_online)(unsigned i);
|
bool (*ssid_is_online)(unsigned i);
|
||||||
bool (*connect_ssid)(unsigned i);
|
bool (*connect_ssid)(unsigned i, const char* passphrase);
|
||||||
|
|
||||||
const char *ident;
|
const char *ident;
|
||||||
} wifi_driver_t;
|
} wifi_driver_t;
|
||||||
|
@ -102,7 +102,7 @@ void driver_wifi_get_ssids(struct string_list *list);
|
||||||
|
|
||||||
bool driver_wifi_ssid_is_online(unsigned i);
|
bool driver_wifi_ssid_is_online(unsigned i);
|
||||||
|
|
||||||
bool driver_wifi_connect_ssid(unsigned i);
|
bool driver_wifi_connect_ssid(unsigned i, const char* passphrase);
|
||||||
|
|
||||||
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data);
|
bool wifi_driver_ctl(enum rarch_wifi_ctl_state state, void *data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue