(RMenu) Cleanups

This commit is contained in:
twinaphex 2013-03-18 18:31:14 +01:00
parent 93522723b0
commit a8a277ec3b
3 changed files with 13 additions and 42 deletions

View File

@ -232,9 +232,6 @@ void menu_settings_msg(unsigned setting, unsigned delay)
switch(setting)
{
case S_MSG_CACHE_PARTITION:
snprintf(str, sizeof(str), "INFO - All the contents of the ZIP files you have selected\nare extracted to this partition.");
break;
case S_MSG_CHANGE_CONTROLS:
snprintf(str, sizeof(str), "INFO - Press LEFT/RIGHT to change the controls, and press\n[RetroPad Start] to reset a button to default values.");
break;
@ -243,28 +240,28 @@ void menu_settings_msg(unsigned setting, unsigned delay)
snprintf(str, sizeof(str), "INFO - Loading %s...", tmp);
break;
case S_MSG_DIR_LOADING_ERROR:
snprintf(str, sizeof(str), "ERROR - Failed to open selected directory.");
strlcpy(str, "ERROR - Failed to open directory.", sizeof(str));
break;
case S_MSG_ROM_LOADING_ERROR:
snprintf(str, sizeof(str), "ERROR - An error occurred during ROM loading.");
strlcpy(str, "ERROR - An error occurred during ROM loading.", sizeof(str));
break;
case S_MSG_NOT_IMPLEMENTED:
snprintf(str, sizeof(str), "TODO - Not yet implemented.");
strlcpy(str, "TODO - Not yet implemented.", sizeof(str));
break;
case S_MSG_RESIZE_SCREEN:
snprintf(str, sizeof(str), "INFO - Resize the screen by moving around the two analog sticks.\nPress [RetroPad X] to reset to default values, and [RetroPad A] to go back.\nTo select the resized screen mode, set Aspect Ratio to: 'Custom'.");
break;
case S_MSG_RESTART_RARCH:
snprintf(str, sizeof(str), "INFO - You need to restart RetroArch.");
strlcpy(str, "INFO - You need to restart RetroArch.", sizeof(str));
break;
case S_MSG_SELECT_LIBRETRO_CORE:
snprintf(str, sizeof(str), "INFO - Select a Libretro core from the menu.");
strlcpy(str, "INFO - Select a Libretro core from the menu.", sizeof(str));
break;
case S_MSG_SELECT_SHADER:
snprintf(str, sizeof(str), "INFO - Select a shader from the menu.");
strlcpy(str, "INFO - Select a shader from the menu.", sizeof(str));
break;
case S_MSG_SHADER_LOADING_SUCCEEDED:
snprintf(str, sizeof(str), "INFO - Shader successfully loaded.");
strlcpy(str, "INFO - Shader successfully loaded.", sizeof(str));
break;
}

View File

@ -68,8 +68,7 @@ enum
enum
{
S_MSG_CACHE_PARTITION = 0,
S_MSG_CHANGE_CONTROLS,
S_MSG_CHANGE_CONTROLS = 0,
S_MSG_LOADING_ROM,
S_MSG_DIR_LOADING_ERROR,
S_MSG_ROM_LOADING_ERROR,

View File

@ -912,34 +912,27 @@ int select_file(void *data, void *state)
rmenu_default_positions_t default_pos;
menu_set_default_pos(&default_pos);
struct platform_bind key_label_b;
strlcpy(key_label_b.desc, "Unknown", sizeof(key_label_b.desc));
key_label_b.joykey = 1ULL << RETRO_DEVICE_ID_JOYPAD_B;
if (driver.input->set_keybinds)
driver.input->set_keybinds(&key_label_b, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
switch(current_menu->enum_id)
{
case SHADER_CHOICE:
strlcpy(extensions, EXT_SHADERS, sizeof(extensions));
snprintf(comment, sizeof(comment), "INFO - Select a shader by pressing [%s].", key_label_b.desc);
strlcpy(comment, "INFO - Select a shader.", sizeof(comment));
break;
case PRESET_CHOICE:
strlcpy(extensions, EXT_CGP_PRESETS, sizeof(extensions));
snprintf(comment, sizeof(comment), "INFO - Select a shader preset by pressing [%s].", key_label_b.desc);
strlcpy(comment, "INFO - Select a shader preset.", sizeof(comment));
break;
case INPUT_PRESET_CHOICE:
strlcpy(extensions, EXT_INPUT_PRESETS, sizeof(extensions));
snprintf(comment, sizeof(comment), "INFO - Select an input preset by pressing [%s].", key_label_b.desc);
strlcpy(comment, "INFO - Select an input preset.", sizeof(comment));
break;
case BORDER_CHOICE:
strlcpy(extensions, EXT_IMAGES, sizeof(extensions));
snprintf(comment, sizeof(comment), "INFO - Select a border image file by pressing [%s].", key_label_b.desc);
strlcpy(comment, "INFO - Select a border image file.", sizeof(comment));
break;
case LIBRETRO_CHOICE:
strlcpy(extensions, EXT_EXECUTABLES, sizeof(extensions));
snprintf(comment, sizeof(comment), "INFO - Select a Libretro core by pressing [%s].", key_label_b.desc);
strlcpy(comment, "INFO - Select a Libretro core.", sizeof(comment));
break;
}
@ -2872,9 +2865,6 @@ int ingame_menu(void *data, void *state)
unsigned menuitem_colors[MENU_ITEM_LAST];
static unsigned menu_idx = 0;
font_params_t font_parms = {0};
struct platform_bind key_label_b = {0};
struct platform_bind key_label_a = {0};
struct platform_bind key_label_start = {0};
filebrowser_t *filebrowser = tmpBrowser;
rmenu_default_positions_t default_pos;
@ -2892,21 +2882,6 @@ int ingame_menu(void *data, void *state)
return -1;
}
strlcpy(key_label_b.desc, "Unknown", sizeof(key_label_b.desc));
key_label_b.joykey = 1ULL << RETRO_DEVICE_ID_JOYPAD_B;
strlcpy(key_label_a.desc, "Unknown", sizeof(key_label_a.desc));
key_label_a.joykey = 1ULL << RETRO_DEVICE_ID_JOYPAD_A;
strlcpy(key_label_start.desc, "Unknown", sizeof(key_label_start.desc));
key_label_start.joykey = 1ULL << RETRO_DEVICE_ID_JOYPAD_START;
if (driver.input->set_keybinds)
{
driver.input->set_keybinds(&key_label_start, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
driver.input->set_keybinds(&key_label_b, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
driver.input->set_keybinds(&key_label_a, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL));
}
switch(menu_idx)
{
case MENU_ITEM_LOAD_STATE: