(Menu) Create menu_entries_get_description

This commit is contained in:
twinaphex 2014-09-03 21:26:05 +02:00
parent a03d1475f9
commit 836124c217
3 changed files with 348 additions and 333 deletions

View File

@ -78,356 +78,340 @@ static int menu_info_screen_iterate(unsigned action)
setting_data_get_description(current_setting, msg, sizeof(msg)); setting_data_get_description(current_setting, msg, sizeof(msg));
else else
{ {
const char *label = NULL;
unsigned info_type; unsigned info_type;
file_list_get_at_offset(driver.menu->selection_buf, file_list_get_at_offset(driver.menu->selection_buf,
driver.menu->selection_ptr, NULL, NULL, driver.menu->selection_ptr, NULL, &label,
&info_type); &info_type);
switch (info_type) if (menu_entries_get_description(label, msg, sizeof(msg)) == -1)
{ {
case MENU_SETTINGS_SHADER_PRESET: switch (info_type)
snprintf(msg, sizeof(msg), {
" -- Load Shader Preset. \n" case MENU_SETTINGS_SHADER_PRESET:
" \n" snprintf(msg, sizeof(msg),
" Load a " " -- Load Shader Preset. \n"
" \n"
" Load a "
#ifdef HAVE_CG #ifdef HAVE_CG
"Cg" "Cg"
#endif #endif
#ifdef HAVE_GLSL #ifdef HAVE_GLSL
#ifdef HAVE_CG #ifdef HAVE_CG
"/" "/"
#endif #endif
"GLSL" "GLSL"
#endif #endif
#ifdef HAVE_HLSL #ifdef HAVE_HLSL
#if defined(HAVE_CG) || defined(HAVE_HLSL) #if defined(HAVE_CG) || defined(HAVE_HLSL)
"/" "/"
#endif #endif
"HLSL" "HLSL"
#endif #endif
" preset directly. \n" " preset directly. \n"
"The menu shader menu is updated accordingly. \n" "The menu shader menu is updated accordingly. \n"
" \n" " \n"
"If the CGP uses scaling methods which are not \n" "If the CGP uses scaling methods which are not \n"
"simple, (i.e. source scaling, same scaling \n" "simple, (i.e. source scaling, same scaling \n"
"factor for X/Y), the scaling factor displayed \n" "factor for X/Y), the scaling factor displayed \n"
"in the menu might not be correct." "in the menu might not be correct."
); );
break; break;
#if 0 case MENU_SETTINGS_SHADER_PASSES:
case MENU_SETTINGS_SHADER_APPLY: snprintf(msg, sizeof(msg),
snprintf(msg, sizeof(msg), " -- Shader Passes. \n"
" -- Apply Shader Changes. \n" " \n"
" \n" "RetroArch allows you to mix and match various \n"
"After changing shader settings, use this to \n" "shaders with arbitrary shader passes, with \n"
"apply changes. \n" "custom hardware filters and scale factors. \n"
" \n" " \n"
"Changing shader settings is a somewhat \n" "This option specifies the number of shader \n"
"expensive operation so it has to be \n" "passes to use. If you set this to 0, and use \n"
"done explicitly. \n" "Apply Shader Changes, you use a 'blank' shader. \n"
" \n" " \n"
"When you apply shaders, the menu shader \n" "The Default Filter option will affect the \n"
"settings are saved to a temporary file (either \n" "stretching filter.");
"menu.cgp or menu.glslp) and loaded. The file \n" break;
"persists after RetroArch exits. The file is \n" case MENU_SETTINGS_BIND_DEVICE:
"saved to Shader Directory." snprintf(msg, sizeof(msg),
); " -- Input Device. \n"
break; " \n"
#endif "Picks which gamepad to use for player N. \n"
case MENU_SETTINGS_SHADER_PASSES: "The name of the pad is available."
snprintf(msg, sizeof(msg), );
" -- Shader Passes. \n" break;
" \n" case MENU_SETTINGS_BIND_DEVICE_TYPE:
"RetroArch allows you to mix and match various \n" snprintf(msg, sizeof(msg),
"shaders with arbitrary shader passes, with \n" " -- Input Device Type. \n"
"custom hardware filters and scale factors. \n" " \n"
" \n" "Picks which device type to use. This is \n"
"This option specifies the number of shader \n" "relevant for the libretro core itself."
"passes to use. If you set this to 0, and use \n" );
"Apply Shader Changes, you use a 'blank' shader. \n" break;
" \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_PLUS:
"The Default Filter option will affect the \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_MINUS:
"stretching filter."); case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_PLUS:
break; case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_MINUS:
case MENU_SETTINGS_BIND_DEVICE: case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_PLUS:
snprintf(msg, sizeof(msg), case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_MINUS:
" -- Input Device. \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_PLUS:
" \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS:
"Picks which gamepad to use for player N. \n" snprintf(msg, sizeof(msg),
"The name of the pad is available." " -- Axis for analog stick (DualShock-esque).\n"
); " \n"
break; "Bound as usual, however, if a real analog \n"
case MENU_SETTINGS_BIND_DEVICE_TYPE: "axis is bound, it can be read as a true analog.\n"
snprintf(msg, sizeof(msg), " \n"
" -- Input Device Type. \n" "Positive X axis is right. \n"
" \n" "Positive Y axis is down.");
"Picks which device type to use. This is \n" break;
"relevant for the libretro core itself." case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_NEXT:
); snprintf(msg, sizeof(msg),
break; " -- Applies next shader in directory.");
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_PLUS: break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_MINUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_PREV:
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_PLUS: snprintf(msg, sizeof(msg),
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_MINUS: " -- Applies previous shader in directory.");
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_PLUS: break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_MINUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_LOAD_STATE_KEY:
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_PLUS: snprintf(msg, sizeof(msg),
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS: " -- Loads state.");
snprintf(msg, sizeof(msg), break;
" -- Axis for analog stick (DualShock-esque).\n" case MENU_SETTINGS_BIND_BEGIN + RARCH_SAVE_STATE_KEY:
" \n" snprintf(msg, sizeof(msg),
"Bound as usual, however, if a real analog \n" " -- Saves state.");
"axis is bound, it can be read as a true analog.\n" break;
" \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_PLUS:
"Positive X axis is right. \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_MINUS:
"Positive Y axis is down."); snprintf(msg, sizeof(msg),
break; " -- State slots.\n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_NEXT: " \n"
snprintf(msg, sizeof(msg), " With slot set to 0, save state name is *.state \n"
" -- Applies next shader in directory."); " (or whatever defined on commandline).\n"
break; "When slot is != 0, path will be (path)(d), \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_PREV: "where (d) is slot number.");
snprintf(msg, sizeof(msg), break;
" -- Applies previous shader in directory."); case MENU_SETTINGS_BIND_BEGIN + RARCH_TURBO_ENABLE:
break; snprintf(msg, sizeof(msg),
case MENU_SETTINGS_BIND_BEGIN + RARCH_LOAD_STATE_KEY: " -- Turbo enable.\n"
snprintf(msg, sizeof(msg), " \n"
" -- Loads state."); "Holding the turbo while pressing another \n"
break; "button will let the button enter a turbo \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_SAVE_STATE_KEY: "mode where the button state is modulated \n"
snprintf(msg, sizeof(msg), "with a periodic signal. \n"
" -- Saves state."); " \n"
break; "The modulation stops when the button \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_PLUS: "itself (not turbo button) is released.");
case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_MINUS: break;
snprintf(msg, sizeof(msg), case MENU_SETTINGS_BIND_BEGIN + RARCH_FAST_FORWARD_HOLD_KEY:
" -- State slots.\n" snprintf(msg, sizeof(msg),
" \n" " -- Hold for fast-forward. Releasing button \n"
" With slot set to 0, save state name is *.state \n" "disables fast-forward.");
" (or whatever defined on commandline).\n" break;
"When slot is != 0, path will be (path)(d), \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_QUIT_KEY:
"where (d) is slot number."); snprintf(msg, sizeof(msg),
break; " -- Key to exit RetroArch cleanly."
case MENU_SETTINGS_BIND_BEGIN + RARCH_TURBO_ENABLE:
snprintf(msg, sizeof(msg),
" -- Turbo enable.\n"
" \n"
"Holding the turbo while pressing another \n"
"button will let the button enter a turbo \n"
"mode where the button state is modulated \n"
"with a periodic signal. \n"
" \n"
"The modulation stops when the button \n"
"itself (not turbo button) is released.");
break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_FAST_FORWARD_HOLD_KEY:
snprintf(msg, sizeof(msg),
" -- Hold for fast-forward. Releasing button \n"
"disables fast-forward.");
break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_QUIT_KEY:
snprintf(msg, sizeof(msg),
" -- Key to exit RetroArch cleanly."
#if !defined(RARCH_MOBILE) && !defined(RARCH_CONSOLE) #if !defined(RARCH_MOBILE) && !defined(RARCH_CONSOLE)
"\nKilling it in any hard way (SIGKILL, \n" "\nKilling it in any hard way (SIGKILL, \n"
"etc) will terminate without saving\n" "etc) will terminate without saving\n"
"RAM, etc. On Unix-likes,\n" "RAM, etc. On Unix-likes,\n"
"SIGINT/SIGTERM allows\n" "SIGINT/SIGTERM allows\n"
"a clean deinitialization." "a clean deinitialization."
#endif #endif
); );
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_REWIND: case MENU_SETTINGS_BIND_BEGIN + RARCH_REWIND:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Hold button down to rewind.\n" " -- Hold button down to rewind.\n"
" \n" " \n"
"Rewind must be enabled."); "Rewind must be enabled.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_MOVIE_RECORD_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_MOVIE_RECORD_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggle between recording and not."); " -- Toggle between recording and not.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_PAUSE_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_PAUSE_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggle between paused and non-paused state."); " -- Toggle between paused and non-paused state.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_FRAMEADVANCE: case MENU_SETTINGS_BIND_BEGIN + RARCH_FRAMEADVANCE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Frame advance when content is paused."); " -- Frame advance when content is paused.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_RESET: case MENU_SETTINGS_BIND_BEGIN + RARCH_RESET:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Reset the content.\n"); " -- Reset the content.\n");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_INDEX_PLUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_INDEX_PLUS:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Increment cheat index.\n"); " -- Increment cheat index.\n");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_INDEX_MINUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_INDEX_MINUS:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Decrement cheat index.\n"); " -- Decrement cheat index.\n");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_CHEAT_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggle cheat index.\n"); " -- Toggle cheat index.\n");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_SCREENSHOT: case MENU_SETTINGS_BIND_BEGIN + RARCH_SCREENSHOT:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Take screenshot."); " -- Take screenshot.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_MUTE: case MENU_SETTINGS_BIND_BEGIN + RARCH_MUTE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Mute/unmute audio."); " -- Mute/unmute audio.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_NETPLAY_FLIP: case MENU_SETTINGS_BIND_BEGIN + RARCH_NETPLAY_FLIP:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Netplay flip players."); " -- Netplay flip players.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_SLOWMOTION: case MENU_SETTINGS_BIND_BEGIN + RARCH_SLOWMOTION:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Hold for slowmotion."); " -- Hold for slowmotion.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_ENABLE_HOTKEY: case MENU_SETTINGS_BIND_BEGIN + RARCH_ENABLE_HOTKEY:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Enable other hotkeys.\n" " -- Enable other hotkeys.\n"
" \n" " \n"
" If this hotkey is bound to either keyboard, \n" " If this hotkey is bound to either keyboard, \n"
"joybutton or joyaxis, all other hotkeys will \n" "joybutton or joyaxis, all other hotkeys will \n"
"be disabled unless this hotkey is also held \n" "be disabled unless this hotkey is also held \n"
"at the same time. \n" "at the same time. \n"
" \n" " \n"
"This is useful for RETRO_KEYBOARD centric \n" "This is useful for RETRO_KEYBOARD centric \n"
"implementations which query a large area of \n" "implementations which query a large area of \n"
"the keyboard, where it is not desirable that \n" "the keyboard, where it is not desirable that \n"
"hotkeys get in the way."); "hotkeys get in the way.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_VOLUME_UP: case MENU_SETTINGS_BIND_BEGIN + RARCH_VOLUME_UP:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Increases audio volume."); " -- Increases audio volume.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_VOLUME_DOWN: case MENU_SETTINGS_BIND_BEGIN + RARCH_VOLUME_DOWN:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Decreases audio volume."); " -- Decreases audio volume.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_OVERLAY_NEXT: case MENU_SETTINGS_BIND_BEGIN + RARCH_OVERLAY_NEXT:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggles to next overlay.\n" " -- Toggles to next overlay.\n"
" \n" " \n"
"Wraps around."); "Wraps around.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_DISK_EJECT_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_DISK_EJECT_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggles eject for disks.\n" " -- Toggles eject for disks.\n"
" \n" " \n"
"Used for multiple-disk content."); "Used for multiple-disk content.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_DISK_NEXT: case MENU_SETTINGS_BIND_BEGIN + RARCH_DISK_NEXT:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Cycles through disk images. Use after \n" " -- Cycles through disk images. Use after \n"
"ejecting. \n" "ejecting. \n"
" \n" " \n"
" Complete by toggling eject again."); " Complete by toggling eject again.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_GRAB_MOUSE_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_GRAB_MOUSE_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggles mouse grab.\n" " -- Toggles mouse grab.\n"
" \n" " \n"
"When mouse is grabbed, RetroArch hides the \n" "When mouse is grabbed, RetroArch hides the \n"
"mouse, and keeps the mouse pointer inside \n" "mouse, and keeps the mouse pointer inside \n"
"the window to allow relative mouse input to \n" "the window to allow relative mouse input to \n"
"work better."); "work better.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_MENU_TOGGLE: case MENU_SETTINGS_BIND_BEGIN + RARCH_MENU_TOGGLE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Toggles menu."); " -- Toggles menu.");
break; break;
case MENU_SETTINGS_SHADER_0_FILTER + (0 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (0 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (1 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (1 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (2 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (2 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (3 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (3 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (4 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (4 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (5 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (5 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (6 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (6 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (7 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (7 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (8 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (8 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (9 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (9 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (10 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (10 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (11 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (11 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (12 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (12 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (13 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (13 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (14 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (14 * 3):
case MENU_SETTINGS_SHADER_0_FILTER + (15 * 3): case MENU_SETTINGS_SHADER_0_FILTER + (15 * 3):
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Hardware filter for this pass. \n" " -- Hardware filter for this pass. \n"
" \n" " \n"
"If 'Don't Care' is set, 'Default \n" "If 'Don't Care' is set, 'Default \n"
"Filter' will be used." "Filter' will be used."
); );
break; break;
case MENU_SETTINGS_SHADER_0 + (0 * 3): case MENU_SETTINGS_SHADER_0 + (0 * 3):
case MENU_SETTINGS_SHADER_0 + (1 * 3): case MENU_SETTINGS_SHADER_0 + (1 * 3):
case MENU_SETTINGS_SHADER_0 + (2 * 3): case MENU_SETTINGS_SHADER_0 + (2 * 3):
case MENU_SETTINGS_SHADER_0 + (3 * 3): case MENU_SETTINGS_SHADER_0 + (3 * 3):
case MENU_SETTINGS_SHADER_0 + (4 * 3): case MENU_SETTINGS_SHADER_0 + (4 * 3):
case MENU_SETTINGS_SHADER_0 + (5 * 3): case MENU_SETTINGS_SHADER_0 + (5 * 3):
case MENU_SETTINGS_SHADER_0 + (6 * 3): case MENU_SETTINGS_SHADER_0 + (6 * 3):
case MENU_SETTINGS_SHADER_0 + (7 * 3): case MENU_SETTINGS_SHADER_0 + (7 * 3):
case MENU_SETTINGS_SHADER_0 + (8 * 3): case MENU_SETTINGS_SHADER_0 + (8 * 3):
case MENU_SETTINGS_SHADER_0 + (9 * 3): case MENU_SETTINGS_SHADER_0 + (9 * 3):
case MENU_SETTINGS_SHADER_0 + (10 * 3): case MENU_SETTINGS_SHADER_0 + (10 * 3):
case MENU_SETTINGS_SHADER_0 + (11 * 3): case MENU_SETTINGS_SHADER_0 + (11 * 3):
case MENU_SETTINGS_SHADER_0 + (12 * 3): case MENU_SETTINGS_SHADER_0 + (12 * 3):
case MENU_SETTINGS_SHADER_0 + (13 * 3): case MENU_SETTINGS_SHADER_0 + (13 * 3):
case MENU_SETTINGS_SHADER_0 + (14 * 3): case MENU_SETTINGS_SHADER_0 + (14 * 3):
case MENU_SETTINGS_SHADER_0 + (15 * 3): case MENU_SETTINGS_SHADER_0 + (15 * 3):
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Path to shader. \n" " -- Path to shader. \n"
" \n" " \n"
"All shaders must be of the same \n" "All shaders must be of the same \n"
"type (i.e. CG, GLSL or HLSL). \n" "type (i.e. CG, GLSL or HLSL). \n"
" \n" " \n"
"Set Shader Directory to set where \n" "Set Shader Directory to set where \n"
"the browser starts to look for \n" "the browser starts to look for \n"
"shaders." "shaders."
); );
break; break;
case MENU_SETTINGS_SHADER_0_SCALE + (0 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (0 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (1 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (1 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (2 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (2 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (3 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (3 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (4 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (4 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (5 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (5 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (6 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (6 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (7 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (7 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (8 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (8 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (9 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (9 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (10 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (10 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (11 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (11 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (12 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (12 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (13 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (13 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (14 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (14 * 3):
case MENU_SETTINGS_SHADER_0_SCALE + (15 * 3): case MENU_SETTINGS_SHADER_0_SCALE + (15 * 3):
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Scale for this pass. \n" " -- Scale for this pass. \n"
" \n" " \n"
"The scale factor accumulates, i.e. 2x \n" "The scale factor accumulates, i.e. 2x \n"
"for first pass and 2x for second pass \n" "for first pass and 2x for second pass \n"
"will give you a 4x total scale. \n" "will give you a 4x total scale. \n"
" \n" " \n"
"If there is a scale factor for last \n" "If there is a scale factor for last \n"
"pass, the result is stretched to \n" "pass, the result is stretched to \n"
"screen with the filter specified in \n" "screen with the filter specified in \n"
"'Default Filter'. \n" "'Default Filter'. \n"
" \n" " \n"
"If 'Don't Care' is set, either 1x \n" "If 'Don't Care' is set, either 1x \n"
"scale or stretch to fullscreen will \n" "scale or stretch to fullscreen will \n"
"be used depending if it's not the last \n" "be used depending if it's not the last \n"
"pass or not." "pass or not."
); );
break; break;
default: default:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
"-- No info on this item available. --\n"); "-- No info on this item available. --\n");
}
} }
} }
} }

View File

@ -840,3 +840,31 @@ void menu_entries_push(file_list_t *list,
menu_clear_navigation(driver.menu); menu_clear_navigation(driver.menu);
driver.menu->need_refresh = true; driver.menu->need_refresh = true;
} }
int menu_entries_get_description(const char *label,
char *msg, size_t sizeof_msg)
{
if (!strcmp(label, "shader_apply_changes"))
{
snprintf(msg, sizeof_msg,
" -- Apply Shader Changes. \n"
" \n"
"After changing shader settings, use this to \n"
"apply changes. \n"
" \n"
"Changing shader settings is a somewhat \n"
"expensive operation so it has to be \n"
"done explicitly. \n"
" \n"
"When you apply shaders, the menu shader \n"
"settings are saved to a temporary file (either \n"
"menu.cgp or menu.glslp) and loaded. The file \n"
"persists after RetroArch exits. The file is \n"
"saved to Shader Directory."
);
return 0;
}
return -1;
}

View File

@ -37,4 +37,7 @@ void menu_entries_pop(file_list_t *list);
void menu_flush_stack_type(file_list_t *list, unsigned final_type); void menu_flush_stack_type(file_list_t *list, unsigned final_type);
int menu_entries_get_description(const char *label, char *msg,
size_t sizeof_msg);
#endif #endif