diff --git a/intl/msg_hash_us.c b/intl/msg_hash_us.c index 5dded686d6..ed275361d8 100644 --- a/intl/msg_hash_us.c +++ b/intl/msg_hash_us.c @@ -25,189 +25,200 @@ #include "../configuration.h" #include "../verbosity.h" -int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) { +int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len) +{ uint32_t driver_hash = 0; settings_t *settings = config_get_ptr(); + if (msg == MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM) + { + snprintf(s, len, + "TODO/FIXME - Fill in message here." + ); + return 0; + } if (msg <= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_END && - msg >= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN) { - unsigned idx = msg - MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN; + msg >= MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN) + { + unsigned idx = msg - MENU_ENUM_LABEL_INPUT_HOTKEY_BIND_BEGIN; - switch (idx) { - case RARCH_FAST_FORWARD_KEY: - snprintf(s, len, - "Toggles between fast-forwarding and \n" - "normal speed." - ); - break; - case RARCH_FAST_FORWARD_HOLD_KEY: - snprintf(s, len, - "Hold for fast-forward. \n" - " \n" - "Releasing button disables fast-forward." - ); - break; - case RARCH_PAUSE_TOGGLE: - snprintf(s, len, - "Toggle between paused and non-paused state."); - break; - case RARCH_FRAMEADVANCE: - snprintf(s, len, - "Frame advance when content is paused."); - break; - case RARCH_SHADER_NEXT: - snprintf(s, len, - "Applies next shader in directory."); - break; - case RARCH_SHADER_PREV: - snprintf(s, len, - "Applies previous shader in directory."); - break; - case RARCH_CHEAT_INDEX_PLUS: - case RARCH_CHEAT_INDEX_MINUS: - case RARCH_CHEAT_TOGGLE: - snprintf(s, len, - "Cheats."); - break; - case RARCH_RESET: - snprintf(s, len, - "Reset the content."); - break; - case RARCH_SCREENSHOT: - snprintf(s, len, - "Take screenshot."); - break; - case RARCH_MUTE: - snprintf(s, len, - "Mute/unmute audio."); - break; - case RARCH_OSK: - snprintf(s, len, - "Toggles onscreen keyboard."); - break; - case RARCH_NETPLAY_FLIP: - snprintf(s, len, - "Netplay flip users."); - break; - case RARCH_NETPLAY_GAME_WATCH: - snprintf(s, len, - "Netplay toggle play/spectate mode."); - break; - case RARCH_SLOWMOTION: - snprintf(s, len, - "Hold for slowmotion."); - break; - case RARCH_ENABLE_HOTKEY: - snprintf(s, len, - "Enable other hotkeys. \n" - " \n" - "If this hotkey is bound to either\n" - "a keyboard, joybutton or joyaxis, \n" - "all other hotkeys will be enabled only \n" - "if this one is held at the same time. \n" - " \n" - "Alternatively, all hotkeys for keyboard \n" - "could be disabled by the user."); - break; - case RARCH_VOLUME_UP: - snprintf(s, len, - "Increases audio volume."); - break; - case RARCH_VOLUME_DOWN: - snprintf(s, len, - "Decreases audio volume."); - break; - case RARCH_OVERLAY_NEXT: - snprintf(s, len, - "Switches to next overlay. Wraps around."); - break; - case RARCH_DISK_EJECT_TOGGLE: - snprintf(s, len, - "Toggles eject for disks. \n" - " \n" - "Used for multiple-disk content. "); - break; - case RARCH_DISK_NEXT: - case RARCH_DISK_PREV: - snprintf(s, len, - "Cycles through disk images. Use after ejecting. \n" - " \n" - "Complete by toggling eject again."); - break; - case RARCH_GRAB_MOUSE_TOGGLE: - snprintf(s, len, - "Toggles mouse grab. \n" - " \n" - "When mouse is grabbed, RetroArch hides the \n" - "mouse, and keeps the mouse pointer inside \n" - "the window to allow relative mouse input to \n" - "work better."); - break; - case RARCH_GAME_FOCUS_TOGGLE: - snprintf(s, len, - "Toggles game focus.\n" - " \n" - "When a game has focus, RetroArch will both disable \n" - "hotkeys and keep/warp the mouse pointer inside the window."); - break; - case RARCH_MENU_TOGGLE: - snprintf(s, len, "Toggles menu."); - break; - case RARCH_LOAD_STATE_KEY: - snprintf(s, len, - "Loads state."); - break; - case RARCH_FULLSCREEN_TOGGLE_KEY: - snprintf(s, len, - "Toggles fullscreen."); - break; - case RARCH_QUIT_KEY: - snprintf(s, len, - "Key to exit RetroArch cleanly. \n" - " \n" - "Killing it in any hard way (SIGKILL, etc.) will \n" - "terminate RetroArch without saving RAM, etc." + switch (idx) + { + case RARCH_FAST_FORWARD_KEY: + snprintf(s, len, + "Toggles between fast-forwarding and \n" + "normal speed." + ); + break; + case RARCH_FAST_FORWARD_HOLD_KEY: + snprintf(s, len, + "Hold for fast-forward. \n" + " \n" + "Releasing button disables fast-forward." + ); + break; + case RARCH_PAUSE_TOGGLE: + snprintf(s, len, + "Toggle between paused and non-paused state."); + break; + case RARCH_FRAMEADVANCE: + snprintf(s, len, + "Frame advance when content is paused."); + break; + case RARCH_SHADER_NEXT: + snprintf(s, len, + "Applies next shader in directory."); + break; + case RARCH_SHADER_PREV: + snprintf(s, len, + "Applies previous shader in directory."); + break; + case RARCH_CHEAT_INDEX_PLUS: + case RARCH_CHEAT_INDEX_MINUS: + case RARCH_CHEAT_TOGGLE: + snprintf(s, len, + "Cheats."); + break; + case RARCH_RESET: + snprintf(s, len, + "Reset the content."); + break; + case RARCH_SCREENSHOT: + snprintf(s, len, + "Take screenshot."); + break; + case RARCH_MUTE: + snprintf(s, len, + "Mute/unmute audio."); + break; + case RARCH_OSK: + snprintf(s, len, + "Toggles onscreen keyboard."); + break; + case RARCH_NETPLAY_FLIP: + snprintf(s, len, + "Netplay flip users."); + break; + case RARCH_NETPLAY_GAME_WATCH: + snprintf(s, len, + "Netplay toggle play/spectate mode."); + break; + case RARCH_SLOWMOTION: + snprintf(s, len, + "Hold for slowmotion."); + break; + case RARCH_ENABLE_HOTKEY: + snprintf(s, len, + "Enable other hotkeys. \n" + " \n" + "If this hotkey is bound to either\n" + "a keyboard, joybutton or joyaxis, \n" + "all other hotkeys will be enabled only \n" + "if this one is held at the same time. \n" + " \n" + "Alternatively, all hotkeys for keyboard \n" + "could be disabled by the user."); + break; + case RARCH_VOLUME_UP: + snprintf(s, len, + "Increases audio volume."); + break; + case RARCH_VOLUME_DOWN: + snprintf(s, len, + "Decreases audio volume."); + break; + case RARCH_OVERLAY_NEXT: + snprintf(s, len, + "Switches to next overlay. Wraps around."); + break; + case RARCH_DISK_EJECT_TOGGLE: + snprintf(s, len, + "Toggles eject for disks. \n" + " \n" + "Used for multiple-disk content. "); + break; + case RARCH_DISK_NEXT: + case RARCH_DISK_PREV: + snprintf(s, len, + "Cycles through disk images. Use after ejecting. \n" + " \n" + "Complete by toggling eject again."); + break; + case RARCH_GRAB_MOUSE_TOGGLE: + snprintf(s, len, + "Toggles mouse grab. \n" + " \n" + "When mouse is grabbed, RetroArch hides the \n" + "mouse, and keeps the mouse pointer inside \n" + "the window to allow relative mouse input to \n" + "work better."); + break; + case RARCH_GAME_FOCUS_TOGGLE: + snprintf(s, len, + "Toggles game focus.\n" + " \n" + "When a game has focus, RetroArch will both disable \n" + "hotkeys and keep/warp the mouse pointer inside the window."); + break; + case RARCH_MENU_TOGGLE: + snprintf(s, len, "Toggles menu."); + break; + case RARCH_LOAD_STATE_KEY: + snprintf(s, len, + "Loads state."); + break; + case RARCH_FULLSCREEN_TOGGLE_KEY: + snprintf(s, len, + "Toggles fullscreen."); + break; + case RARCH_QUIT_KEY: + snprintf(s, len, + "Key to exit RetroArch cleanly. \n" + " \n" + "Killing it in any hard way (SIGKILL, etc.) will \n" + "terminate RetroArch without saving RAM, etc." #ifdef __unix__ - "\nOn Unix-likes, SIGINT/SIGTERM allows a clean \n" - "deinitialization." + "\nOn Unix-likes, SIGINT/SIGTERM allows a clean \n" + "deinitialization." #endif - ""); - break; - case RARCH_STATE_SLOT_PLUS: - case RARCH_STATE_SLOT_MINUS: - snprintf(s, len, - "State slots. \n" - " \n" - "With slot set to 0, save state name is \n" - "*.state (or whatever defined on commandline). \n" - " \n" - "When slot is not 0, path will be , \n" - "where is slot number."); - break; - case RARCH_SAVE_STATE_KEY: - snprintf(s, len, - "Saves state."); - break; - case RARCH_REWIND: - snprintf(s, len, - "Hold button down to rewind. \n" - " \n" - "Rewinding must be enabled."); - break; - case RARCH_MOVIE_RECORD_TOGGLE: - snprintf(s, len, - "Toggle between recording and not."); - break; - default: - if (string_is_empty(s)) - strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); - break; - } + ""); + break; + case RARCH_STATE_SLOT_PLUS: + case RARCH_STATE_SLOT_MINUS: + snprintf(s, len, + "State slots. \n" + " \n" + "With slot set to 0, save state name is \n" + "*.state (or whatever defined on commandline). \n" + " \n" + "When slot is not 0, path will be , \n" + "where is slot number."); + break; + case RARCH_SAVE_STATE_KEY: + snprintf(s, len, + "Saves state."); + break; + case RARCH_REWIND: + snprintf(s, len, + "Hold button down to rewind. \n" + " \n" + "Rewinding must be enabled."); + break; + case RARCH_MOVIE_RECORD_TOGGLE: + snprintf(s, len, + "Toggle between recording and not."); + break; + default: + if (string_is_empty(s)) + strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE), len); + break; + } - return 0; + return 0; } - switch (msg) { + switch (msg) + { case MENU_ENUM_LABEL_ACCOUNTS_RETRO_ACHIEVEMENTS: snprintf(s, len, "Login details for your \n" "Retro Achievements account. \n" diff --git a/menu/cbs/menu_cbs_info.c b/menu/cbs/menu_cbs_info.c index ea8de9f7f0..9d8a6338c6 100644 --- a/menu/cbs/menu_cbs_info.c +++ b/menu/cbs/menu_cbs_info.c @@ -70,20 +70,6 @@ static int action_info_cheevos(unsigned type, const char *label) } #endif -#ifdef HAVE_NETWORKING -static int action_info_room(unsigned type, const char *label) -{ - unsigned new_id = type - MENU_SETTINGS_NETPLAY_ROOMS_START; -#if 1 - RARCH_LOG ("Room id: %u IP: %s Port: %u\n", new_id, - netplay_room_list[new_id].address, netplay_room_list[new_id].port); -#endif - /* add description here - the relevant data is in netplay_room_list[new_id]*/ - return 0; -} -#endif - int menu_cbs_init_bind_info(menu_file_list_cbs_t *cbs, const char *path, const char *label, unsigned type, size_t idx) { @@ -99,14 +85,6 @@ int menu_cbs_init_bind_info(menu_file_list_cbs_t *cbs, } #endif -#ifdef HAVE_NETWORKING - if ((type >= MENU_SETTINGS_NETPLAY_ROOMS_START)) - { - BIND_ACTION_INFO(cbs, action_info_room); - return 0; - } -#endif - BIND_ACTION_INFO(cbs, action_info_default); return -1; diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 2d6154cbc5..8266ddf08b 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -3413,6 +3413,7 @@ static int action_ok_push_scan_file(const char *path, #ifdef HAVE_NETWORKING struct netplay_host_list *lan_hosts; int lan_room_count; + void netplay_refresh_rooms_menu(file_list_t *list) { char s[4115];