diff --git a/input/input_driver.c b/input/input_driver.c index 485a49d19a..470986d2d9 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -606,6 +606,7 @@ static INLINE bool input_menu_keys_pressed_internal( return false; } +#ifdef HAVE_MENU static bool input_driver_toggle_button_combo( unsigned mode, uint64_t *trigger_input) { @@ -650,6 +651,7 @@ static bool input_driver_toggle_button_combo( return true; } +#endif /** * input_menu_keys_pressed: @@ -723,6 +725,7 @@ uint64_t input_menu_keys_pressed( input_driver_block_hotkey = true; } +#ifdef HAVE_MENU if ( ((settings->input.menu_toggle_gamepad_combo != INPUT_TOGGLE_NONE) && input_driver_toggle_button_combo( settings->input.menu_toggle_gamepad_combo, &old_input)) @@ -731,6 +734,7 @@ uint64_t input_menu_keys_pressed( settings->input.binds[0][RARCH_MENU_TOGGLE].valid, settings->input.all_users_control_menu)) ret |= (UINT64_C(1) << RARCH_MENU_TOGGLE); +#endif for (i = 0; i < RARCH_BIND_LIST_END; i++) { @@ -944,11 +948,13 @@ uint64_t input_keys_pressed( input_driver_block_hotkey = false; } +#ifdef HAVE_MENU if ( ((settings->input.menu_toggle_gamepad_combo != INPUT_TOGGLE_NONE) && input_driver_toggle_button_combo(settings->input.menu_toggle_gamepad_combo, &old_input)) || input_keys_pressed_internal(settings, joypad_info, RARCH_MENU_TOGGLE, binds)) ret |= (UINT64_C(1) << RARCH_MENU_TOGGLE); +#endif for (i = 0; i < RARCH_BIND_LIST_END; i++) { diff --git a/input/input_overlay.c b/input/input_overlay.c index 3a04b2738c..a252ebbb3d 100644 --- a/input/input_overlay.c +++ b/input/input_overlay.c @@ -30,6 +30,7 @@ #endif #include "../verbosity.h" +#include "../gfx/video_driver.h" #include "input_overlay.h" #include "input_keyboard.h" diff --git a/network/netplay/netplay_handshake.c b/network/netplay/netplay_handshake.c index ad58ea3cf0..4df482e0e9 100644 --- a/network/netplay/netplay_handshake.c +++ b/network/netplay/netplay_handshake.c @@ -25,13 +25,20 @@ #include "netplay_private.h" +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + #include "../../autosave.h" #include "../../configuration.h" #include "../../content.h" #include "../../retroarch.h" #include "../../runloop.h" #include "../../version.h" + +#ifdef HAVE_MENU #include "../../menu/widgets/menu_input_dialog.h" +#endif #ifndef HAVE_SOCKET_LEGACY /* Custom inet_ntop. Win32 doesn't seem to support this ... */ @@ -265,8 +272,9 @@ struct info_buf_s } \ else if (recvd < 0) -static netplay_t *handshake_password_netplay; +static netplay_t *handshake_password_netplay = NULL; +#ifdef HAVE_MENU static void handshake_password(void *ignore, const char *line) { struct password_buf_s password_buf; @@ -285,9 +293,12 @@ static void handshake_password(void *ignore, const char *line) if (netplay_send(&connection->send_packet_buffer, connection->fd, &password_buf, sizeof(password_buf))) netplay_send_flush(&connection->send_packet_buffer, connection->fd, false); +#ifdef HAVE_MENU menu_input_dialog_end(); rarch_ctl(RARCH_CTL_MENU_RUNNING_FINISHED, NULL); +#endif } +#endif /** * netplay_handshake_init @@ -381,15 +392,21 @@ bool netplay_handshake_init(netplay_t *netplay, /* If a password is demanded, ask for it */ if (!netplay->is_server && (connection->salt = ntohl(header[3]))) { +#ifdef HAVE_MENU menu_input_ctx_line_t line; rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL); - memset(&line, 0, sizeof(line)); +#endif + handshake_password_netplay = netplay; - line.label = msg_hash_to_str(MSG_NETPLAY_ENTER_PASSWORD); + +#ifdef HAVE_MENU + memset(&line, 0, sizeof(line)); + line.label = msg_hash_to_str(MSG_NETPLAY_ENTER_PASSWORD); line.label_setting = "no_setting"; - line.cb = handshake_password; + line.cb = handshake_password; if (!menu_input_dialog_start(&line)) return false; +#endif } /* Send our nick */ diff --git a/runloop.c b/runloop.c index bb9bce5e28..a4c60ab324 100644 --- a/runloop.c +++ b/runloop.c @@ -711,7 +711,11 @@ static enum runloop_state runloop_check_state( if (runloop_cmd_triggered(trigger_input, RARCH_FULLSCREEN_TOGGLE_KEY)) { - bool fullscreen_toggled = !runloop_paused || menu_driver_is_alive(); + bool fullscreen_toggled = !runloop_paused +#ifdef HAVE_MENU + || menu_driver_is_alive(); +#endif + ; if (fullscreen_toggled) command_event(CMD_EVENT_FULLSCREEN_TOGGLE, NULL); diff --git a/setting_list.c b/setting_list.c index 1b7af3fd02..9cb30d5a7e 100644 --- a/setting_list.c +++ b/setting_list.c @@ -124,13 +124,17 @@ static int setting_bind_action_ok(void *data, bool wraparound) static int setting_int_action_right_default(void *data, bool wraparound) { rarch_setting_t *setting = (rarch_setting_t*)data; +#ifdef HAVE_MENU double min = 0.0f; +#endif double max = 0.0f; if (!setting) return -1; +#ifdef HAVE_MENU min = setting->min; +#endif max = setting->max; (void)wraparound; /* TODO/FIXME - handle this */ @@ -231,13 +235,17 @@ static int setting_uint_action_left_default(void *data, bool wraparound) static int setting_uint_action_right_default(void *data, bool wraparound) { rarch_setting_t *setting = (rarch_setting_t*)data; +#ifdef HAVE_MENU double min = 0.0f; +#endif double max = 0.0f; if (!setting) return -1; +#ifdef HAVE_MENU min = setting->min; +#endif max = setting->max; (void)wraparound; /* TODO/FIXME - handle this */ @@ -419,13 +427,17 @@ static int setting_fraction_action_right_default( void *data, bool wraparound) { rarch_setting_t *setting = (rarch_setting_t*)data; +#ifdef HAVE_MENU double min = 0.0f; +#endif double max = 0.0f; if (!setting) return -1; +#ifdef HAVE_MENU min = setting->min; +#endif max = setting->max; (void)wraparound; /* TODO/FIXME - handle this */ @@ -1526,8 +1538,12 @@ bool CONFIG_BOOL( (*list)[list_info->index++] = value; if (flags != SD_FLAG_NONE) settings_data_list_current_add_flags(list, list_info, flags); + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } @@ -1555,8 +1571,12 @@ bool CONFIG_INT( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } @@ -1608,8 +1628,12 @@ bool CONFIG_UINT( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } @@ -1634,8 +1658,12 @@ bool CONFIG_FLOAT( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } @@ -1664,8 +1692,10 @@ bool CONFIG_PATH( value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; settings_data_list_current_add_flags(list, list_info, SD_FLAG_ALLOW_EMPTY); +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif return true; } @@ -1700,8 +1730,10 @@ bool CONFIG_DIR( list_info, SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR | SD_FLAG_BROWSER_ACTION); +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif return true; } @@ -1728,8 +1760,10 @@ bool CONFIG_STRING( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif return true; } @@ -1757,8 +1791,11 @@ bool CONFIG_STRING_OPTIONS( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif /* Request values to be freed later */ settings_data_list_current_add_free_flags(list, list_info, SD_FREE_FLAG_VALUES); @@ -1788,8 +1825,12 @@ bool CONFIG_HEX( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } @@ -1889,8 +1930,12 @@ bool CONFIG_ACTION( if (value.name) value.name_hash = msg_hash_calculate(value.name); (*list)[list_info->index++] = value; + +#ifdef HAVE_MENU menu_settings_list_current_add_enum_idx(list, list_info, name_enum_idx); menu_settings_list_current_add_enum_value_idx(list, list_info, SHORT_enum_idx); +#endif + return true; } diff --git a/tasks/task_netplay_lan_scan.c b/tasks/task_netplay_lan_scan.c index 38c86c3789..edf58b837e 100644 --- a/tasks/task_netplay_lan_scan.c +++ b/tasks/task_netplay_lan_scan.c @@ -13,25 +13,36 @@ * If not, see . */ +#include #include #include "tasks_internal.h" + +#ifdef HAVE_CONFIG_H +#include "../config.h" +#endif + #include "../verbosity.h" #include "../network/netplay/netplay_discovery.h" + +#ifdef HAVE_MENU #include "../menu/menu_entries.h" #include "../menu/menu_driver.h" +#endif static void netplay_lan_scan_callback(void *task_data, void *user_data, const char *error) { unsigned i; - unsigned menu_type = 0; - const char *path = NULL; - const char *label = NULL; - enum msg_hash_enums enum_idx = MSG_UNKNOWN; file_list_t *file_list = NULL; struct netplay_host_list *netplay_hosts = NULL; +#ifdef HAVE_MENU + enum msg_hash_enums enum_idx = MSG_UNKNOWN; + unsigned menu_type = 0; + const char *label = NULL; + const char *path = NULL; + menu_entries_get_last_stack(&path, &label, &menu_type, &enum_idx, NULL); /* Don't push the results if we left the LAN scan menu */ @@ -60,6 +71,7 @@ static void netplay_lan_scan_callback(void *task_data, MENU_NETPLAY_LAN_SCAN, 0, 0); } } +#endif } static void task_netplay_lan_scan_handler(retro_task_t *task) diff --git a/tasks/task_wifi.c b/tasks/task_wifi.c index 8fc081cbcb..050766d301 100644 --- a/tasks/task_wifi.c +++ b/tasks/task_wifi.c @@ -39,13 +39,15 @@ static void wifi_scan_callback(void *task_data, void *user_data, const char *error) { unsigned i; - unsigned menu_type = 0; - const char *path = NULL; - const char *label = NULL; - enum msg_hash_enums enum_idx = MSG_UNKNOWN; file_list_t *file_list = NULL; struct string_list *ssid_list = NULL; +#ifdef HAVE_MENU + const char *path = NULL; + const char *label = NULL; + unsigned menu_type = 0; + enum msg_hash_enums enum_idx = MSG_UNKNOWN; + menu_entries_get_last_stack(&path, &label, &menu_type, &enum_idx, NULL); /* Don't push the results if we left the wifi menu */ @@ -54,12 +56,14 @@ static void wifi_scan_callback(void *task_data, return; file_list = menu_entries_get_selection_buf_ptr(0); - ssid_list = string_list_new(); - menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, file_list); +#endif + + ssid_list = string_list_new(); driver_wifi_get_ssids(ssid_list); +#ifdef HAVE_MENU for (i = 0; i < ssid_list->size; i++) { const char *ssid = ssid_list->elems[i].data; @@ -69,6 +73,7 @@ static void wifi_scan_callback(void *task_data, MENU_ENUM_LABEL_CONNECT_WIFI, MENU_WIFI, 0, 0); } +#endif string_list_free(ssid_list); }