diff --git a/frontend/menu/menu_settings.c b/frontend/menu/menu_settings.c index de739e1694..08f75418a7 100644 --- a/frontend/menu/menu_settings.c +++ b/frontend/menu/menu_settings.c @@ -88,6 +88,10 @@ int menu_set_settings(unsigned setting, unsigned action) switch (setting) { + case RGUI_START_SCREEN: + if (action == RGUI_ACTION_OK) + rgui_list_push(rgui->menu_stack, "", RGUI_START_SCREEN, 0); + break; case RGUI_SETTINGS_REWIND_ENABLE: if (action == RGUI_ACTION_OK || action == RGUI_ACTION_LEFT || diff --git a/frontend/menu/rgui.c b/frontend/menu/rgui.c index 2584c23d90..f8e9eef024 100644 --- a/frontend/menu/rgui.c +++ b/frontend/menu/rgui.c @@ -277,6 +277,7 @@ static void rgui_settings_populate_entries(rgui_handle_t *rgui) #endif rgui_list_push(rgui->selection_buf, "RetroArch Config", RGUI_SETTINGS_CONFIG, 0); rgui_list_push(rgui->selection_buf, "Save New Config", RGUI_SETTINGS_SAVE_CONFIG, 0); + rgui_list_push(rgui->selection_buf, "Help", RGUI_START_SCREEN, 0); rgui_list_push(rgui->selection_buf, "Quit RetroArch", RGUI_SETTINGS_QUIT_RARCH, 0); } @@ -549,26 +550,61 @@ static int rgui_custom_bind_iterate(rgui_handle_t *rgui, rgui_action_t action) static int rgui_start_screen_iterate(rgui_handle_t *rgui, rgui_action_t action) { render_text(rgui); - render_messagebox(rgui, - "-- Welcome to RetroArch --\n" + char msg[1024]; + + char desc[6][64]; + static const unsigned binds[] = { + RETRO_DEVICE_ID_JOYPAD_UP, + RETRO_DEVICE_ID_JOYPAD_DOWN, + RETRO_DEVICE_ID_JOYPAD_A, + RETRO_DEVICE_ID_JOYPAD_B, + RARCH_MENU_TOGGLE, + RARCH_QUIT_KEY, + }; + + for (unsigned i = 0; i < ARRAY_SIZE(binds); i++) + { + if (driver.input && driver.input->set_keybinds) + { + struct platform_bind key_label; + strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc)); + key_label.joykey = g_settings.input.binds[0][binds[i]].joykey; + driver.input->set_keybinds(&key_label, 0, 0, 0, 1ULL << KEYBINDS_ACTION_GET_BIND_LABEL); + strlcpy(desc[i], key_label.desc, sizeof(desc[i])); + } + else + { + const struct retro_keybind *bind = &g_settings.input.binds[0][binds[i]]; + input_get_bind_string(desc[i], bind, sizeof(desc[i])); + } + } + + snprintf(msg, sizeof(msg), + "-- Welcome to RetroArch / RGUI --\n" " \n" // strtok_r doesn't split empty strings. -#if !defined(RARCH_CONSOLE) && !defined(RARCH_MOBILE) - "Default keyboard controls: \n" - " Arrow keys: Navigate \n" - " X: Accept/OK \n" - " Z: Back \n" - " F1: Enter/Exit RGUI \n" - " ESC: Exit RetroArch \n" - " \n" -#endif - - "To play a game: \n" - " Load a libretro core (Core).\n" - " Load a ROM (Load Game). \n" + "Basic RGUI controls:\n" + " Scroll (Up): %-20s\n" + " Scroll (Down): %-20s\n" + " Accept/OK: %-20s\n" + " Back: %-20s\n" + "Enter/Exit RGUI: %-20s\n" + " Exit RetroArch: %-20s\n" " \n" - "Press Accept/OK to continue."); + "To play a game:\n" + "Load a libretro core (Core).\n" + "Load a ROM (Load Game). \n" + " \n" + + "See Path Options to set directories\n" + "for faster access to files.\n" + " \n" + + "Press Accept/OK to continue.", + desc[0], desc[1], desc[2], desc[3], desc[4], desc[5]); + + render_messagebox(rgui, msg); if (action == RGUI_ACTION_OK) rgui_list_pop(rgui->menu_stack, &rgui->selection_ptr); diff --git a/frontend/menu/rguidisp_bitmap.c b/frontend/menu/rguidisp_bitmap.c index 897a18560c..305ffad3c6 100644 --- a/frontend/menu/rguidisp_bitmap.c +++ b/frontend/menu/rguidisp_bitmap.c @@ -569,6 +569,7 @@ static void render_text(rgui_handle_t *rgui) case RGUI_SETTINGS_OPTIONS: case RGUI_SETTINGS_CUSTOM_BIND_ALL: case RGUI_SETTINGS_CUSTOM_BIND_DEFAULT_ALL: + case RGUI_START_SCREEN: strlcpy(type_str, "...", sizeof(type_str)); break; #ifdef HAVE_OVERLAY