(Menu) Combine get_description functions

This commit is contained in:
twinaphex 2014-09-05 04:21:46 +02:00
parent b02ce0ba62
commit 3dcb74ddbb
5 changed files with 575 additions and 435 deletions

View File

@ -54,6 +54,8 @@ static void *get_last_setting(const file_list_t *list, int index,
static int menu_info_screen_iterate(unsigned action) static int menu_info_screen_iterate(unsigned action)
{ {
char msg[PATH_MAX]; char msg[PATH_MAX];
char needle[PATH_MAX];
unsigned info_type = 0;
rarch_setting_t *current_setting = NULL; rarch_setting_t *current_setting = NULL;
rarch_setting_t *setting_data = (rarch_setting_t *)setting_data_get_list(); rarch_setting_t *setting_data = (rarch_setting_t *)setting_data_get_list();
@ -69,225 +71,224 @@ static int menu_info_screen_iterate(unsigned action)
setting_data_get_list()); setting_data_get_list());
if (current_setting) if (current_setting)
setting_data_get_description(current_setting, msg, sizeof(msg)); strlcpy(needle, current_setting->name, sizeof(needle));
else else if ((current_setting = (rarch_setting_t*)get_last_setting(
{
current_setting = (rarch_setting_t*)get_last_setting(
driver.menu->selection_buf, driver.menu->selection_buf,
driver.menu->selection_ptr, driver.menu->selection_ptr,
setting_data_get_mainmenu(true)); setting_data_get_mainmenu(true))))
{
if (current_setting) strlcpy(needle, current_setting->name, sizeof(needle));
setting_data_get_description(current_setting, msg, sizeof(msg)); }
else else
{ {
const char *label = NULL; const char *label = NULL;
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, &label, driver.menu->selection_ptr, NULL, &label,
&info_type); &info_type);
if (menu_entries_get_description(label, msg, sizeof(msg)) == -1) if (label)
{ strlcpy(needle, label, sizeof(needle));
switch (info_type) }
{
case MENU_SETTINGS_BIND_DEVICE: if (needle[0] == '\0' || setting_data_get_description(needle, msg, sizeof(msg)) == -1)
snprintf(msg, sizeof(msg), {
" -- Input Device. \n" switch (info_type)
" \n" {
"Picks which gamepad to use for player N. \n" case MENU_SETTINGS_BIND_DEVICE:
"The name of the pad is available." snprintf(msg, sizeof(msg),
); " -- Input Device. \n"
break; " \n"
case MENU_SETTINGS_BIND_DEVICE_TYPE: "Picks which gamepad to use for player N. \n"
snprintf(msg, sizeof(msg), "The name of the pad is available."
" -- Input Device Type. \n" );
" \n" break;
"Picks which device type to use. This is \n" case MENU_SETTINGS_BIND_DEVICE_TYPE:
"relevant for the libretro core itself." snprintf(msg, sizeof(msg),
); " -- Input Device Type. \n"
break; " \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_PLUS: "Picks which device type to use. This is \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_MINUS: "relevant for the libretro core itself."
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_PLUS: );
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_MINUS: break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_PLUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_PLUS:
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_MINUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_X_MINUS:
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_PLUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_PLUS:
case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_LEFT_Y_MINUS:
snprintf(msg, sizeof(msg), case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_PLUS:
" -- Axis for analog stick (DualShock-esque).\n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_X_MINUS:
" \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_PLUS:
"Bound as usual, however, if a real analog \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_ANALOG_RIGHT_Y_MINUS:
"axis is bound, it can be read as a true analog.\n" snprintf(msg, sizeof(msg),
" \n" " -- Axis for analog stick (DualShock-esque).\n"
"Positive X axis is right. \n" " \n"
"Positive Y axis is down."); "Bound as usual, however, if a real analog \n"
break; "axis is bound, it can be read as a true analog.\n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_NEXT: " \n"
snprintf(msg, sizeof(msg), "Positive X axis is right. \n"
" -- Applies next shader in directory."); "Positive Y axis is down.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_PREV: case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_NEXT:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Applies previous shader in directory."); " -- Applies next shader in directory.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_LOAD_STATE_KEY: case MENU_SETTINGS_BIND_BEGIN + RARCH_SHADER_PREV:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Loads state."); " -- Applies previous shader in directory.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_SAVE_STATE_KEY: case MENU_SETTINGS_BIND_BEGIN + RARCH_LOAD_STATE_KEY:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
" -- Saves state."); " -- Loads state.");
break; break;
case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_PLUS: case MENU_SETTINGS_BIND_BEGIN + RARCH_SAVE_STATE_KEY:
case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_MINUS: snprintf(msg, sizeof(msg),
snprintf(msg, sizeof(msg), " -- Saves state.");
" -- State slots.\n" break;
" \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_PLUS:
" With slot set to 0, save state name is *.state \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_STATE_SLOT_MINUS:
" (or whatever defined on commandline).\n" snprintf(msg, sizeof(msg),
"When slot is != 0, path will be (path)(d), \n" " -- State slots.\n"
"where (d) is slot number."); " \n"
break; " With slot set to 0, save state name is *.state \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_TURBO_ENABLE: " (or whatever defined on commandline).\n"
snprintf(msg, sizeof(msg), "When slot is != 0, path will be (path)(d), \n"
" -- Turbo enable.\n" "where (d) is slot number.");
" \n" break;
"Holding the turbo while pressing another \n" case MENU_SETTINGS_BIND_BEGIN + RARCH_TURBO_ENABLE:
"button will let the button enter a turbo \n" snprintf(msg, sizeof(msg),
"mode where the button state is modulated \n" " -- Turbo enable.\n"
"with a periodic signal. \n" " \n"
" \n" "Holding the turbo while pressing another \n"
"The modulation stops when the button \n" "button will let the button enter a turbo \n"
"itself (not turbo button) is released."); "mode where the button state is modulated \n"
break; "with a periodic signal. \n"
case MENU_SETTINGS_BIND_BEGIN + RARCH_FAST_FORWARD_HOLD_KEY: " \n"
snprintf(msg, sizeof(msg), "The modulation stops when the button \n"
" -- Hold for fast-forward. Releasing button \n" "itself (not turbo button) is released.");
"disables fast-forward."); break;
break; case MENU_SETTINGS_BIND_BEGIN + RARCH_FAST_FORWARD_HOLD_KEY:
case MENU_SETTINGS_BIND_BEGIN + RARCH_QUIT_KEY: snprintf(msg, sizeof(msg),
snprintf(msg, sizeof(msg), " -- Hold for fast-forward. Releasing button \n"
" -- Key to exit RetroArch cleanly." "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;
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

@ -854,141 +854,3 @@ 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;
}
else if (!strcmp(label, "video_shader_preset"))
{
snprintf(msg, sizeof_msg,
" -- Load Shader Preset. \n"
" \n"
" Load a "
#ifdef HAVE_CG
"Cg"
#endif
#ifdef HAVE_GLSL
#ifdef HAVE_CG
"/"
#endif
"GLSL"
#endif
#ifdef HAVE_HLSL
#if defined(HAVE_CG) || defined(HAVE_HLSL)
"/"
#endif
"HLSL"
#endif
" preset directly. \n"
"The menu shader menu is updated accordingly. \n"
" \n"
"If the CGP uses scaling methods which are not \n"
"simple, (i.e. source scaling, same scaling \n"
"factor for X/Y), the scaling factor displayed \n"
"in the menu might not be correct."
);
return 0;
}
else if (!strcmp(label, "video_shader_num_passes"))
{
snprintf(msg, sizeof_msg,
" -- Shader Passes. \n"
" \n"
"RetroArch allows you to mix and match various \n"
"shaders with arbitrary shader passes, with \n"
"custom hardware filters and scale factors. \n"
" \n"
"This option specifies the number of shader \n"
"passes to use. If you set this to 0, and use \n"
"Apply Shader Changes, you use a 'blank' shader. \n"
" \n"
"The Default Filter option will affect the \n"
"stretching filter.");
return 0;
}
else if (!strcmp(label, "video_shader_parameters"))
{
snprintf(msg, sizeof_msg,
"-- Shader Parameters. \n"
" \n"
"Modifies current shader directly. Will not be \n"
"saved to CGP/GLSLP preset file.");
return 0;
}
else if (!strcmp(label, "video_shader_preset_parameters"))
{
snprintf(msg, sizeof_msg,
"-- Shader Preset Parameters. \n"
" \n"
"Modifies shader preset currently in menu."
);
return 0;
}
else if (!strcmp(label, "video_shader_pass"))
{
snprintf(msg, sizeof_msg,
" -- Path to shader. \n"
" \n"
"All shaders must be of the same \n"
"type (i.e. CG, GLSL or HLSL). \n"
" \n"
"Set Shader Directory to set where \n"
"the browser starts to look for \n"
"shaders."
);
return 0;
}
else if (!strcmp(label, "video_shader_filter_pass"))
{
snprintf(msg, sizeof_msg,
" -- Hardware filter for this pass. \n"
" \n"
"If 'Don't Care' is set, 'Default \n"
"Filter' will be used."
);
return 0;
}
else if (!strcmp(label, "video_shader_scale_pass"))
{
snprintf(msg, sizeof_msg,
" -- Scale for this pass. \n"
" \n"
"The scale factor accumulates, i.e. 2x \n"
"for first pass and 2x for second pass \n"
"will give you a 4x total scale. \n"
" \n"
"If there is a scale factor for last \n"
"pass, the result is stretched to \n"
"screen with the filter specified in \n"
"'Default Filter'. \n"
" \n"
"If 'Don't Care' is set, either 1x \n"
"scale or stretch to fullscreen will \n"
"be used depending if it's not the last \n"
"pass or not."
);
return 0;
}
return -1;
}

View File

@ -38,7 +38,4 @@ 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);
void menu_flush_stack_label(file_list_t *list, const char *needle); void menu_flush_stack_label(file_list_t *list, const char *needle);
int menu_entries_get_description(const char *label, char *msg,
size_t sizeof_msg);
#endif #endif

View File

@ -612,15 +612,10 @@ rarch_setting_t setting_data_bind_setting(const char* name,
return result; return result;
} }
void setting_data_get_description(const void *data, char *msg, int setting_data_get_description(const char *label, char *msg,
size_t sizeof_msg) size_t sizeof_msg)
{ {
const rarch_setting_t *setting = (const rarch_setting_t*)data; if (!strcmp(label, "input_driver"))
if (!setting)
return;
if (!strcmp(setting->name, "input_driver"))
{ {
if (!strcmp(g_settings.input.driver, "udev")) if (!strcmp(g_settings.input.driver, "udev"))
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
@ -658,8 +653,11 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
"Depending on video driver, it might \n" "Depending on video driver, it might \n"
"force a different input driver."); "force a different input driver.");
return 0;
} }
else if (!strcmp(setting->name, "load_content")) else if (!strcmp(label, "load_content"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Load Content. \n" " -- Load Content. \n"
"Browse for content. \n" "Browse for content. \n"
@ -678,7 +676,10 @@ void setting_data_get_description(const void *data, char *msg,
"in 'Core', and use that core when \n" "in 'Core', and use that core when \n"
"content is loaded." "content is loaded."
); );
else if (!strcmp(setting->name, "core_list")) return 0;
}
else if (!strcmp(label, "core_list"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Core Selection. \n" " -- Core Selection. \n"
" \n" " \n"
@ -691,7 +692,10 @@ void setting_data_get_description(const void *data, char *msg,
"will use that as top folder. If Core \n" "will use that as top folder. If Core \n"
"Directory is a full path, it will start \n" "Directory is a full path, it will start \n"
"in the folder where the file is."); "in the folder where the file is.");
else if (!strcmp(setting->name, "history_list")) return 0;
}
else if (!strcmp(label, "history_list"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Loading content from history. \n" " -- Loading content from history. \n"
" \n" " \n"
@ -704,7 +708,9 @@ void setting_data_get_description(const void *data, char *msg,
"will not be saved or loaded, and will not exist \n" "will not be saved or loaded, and will not exist \n"
"in the main menu." "in the main menu."
); );
else if (!strcmp(setting->name, "audio_resampler_driver")) return 0;
}
else if (!strcmp(label, "audio_resampler_driver"))
{ {
if (!strcmp(g_settings.audio.resampler, "sinc")) if (!strcmp(g_settings.audio.resampler, "sinc"))
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
@ -712,8 +718,9 @@ void setting_data_get_description(const void *data, char *msg,
else if (!strcmp(g_settings.audio.resampler, "CC")) else if (!strcmp(g_settings.audio.resampler, "CC"))
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Convoluted Cosine implementation."); " -- Convoluted Cosine implementation.");
return 0;
} }
else if (!strcmp(setting->name, "video_driver")) else if (!strcmp(label, "video_driver"))
{ {
if (!strcmp(g_settings.video.driver, "gl")) if (!strcmp(g_settings.video.driver, "gl"))
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
@ -766,24 +773,35 @@ void setting_data_get_description(const void *data, char *msg,
else else
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Current Video driver."); " -- Current Video driver.");
return 0;
} }
else if (!strcmp(setting->name, "audio_dsp_plugin")) else if (!strcmp(label, "audio_dsp_plugin"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Audio DSP plugin.\n" " -- Audio DSP plugin.\n"
" Processes audio before it's sent to \n" " Processes audio before it's sent to \n"
"the driver." "the driver."
); );
else if (!strcmp(setting->name, "libretro_dir_path")) return 0;
}
else if (!strcmp(label, "libretro_dir_path"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Core Directory. \n" " -- Core Directory. \n"
" \n" " \n"
"A directory for where to search for \n" "A directory for where to search for \n"
"libretro core implementations."); "libretro core implementations.");
else if (!strcmp(setting->name, "video_disable_composition")) return 0;
}
else if (!strcmp(label, "video_disable_composition"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- Forcibly disable composition.\n" "-- Forcibly disable composition.\n"
"Only valid on Windows Vista/7 for now."); "Only valid on Windows Vista/7 for now.");
else if (!strcmp(setting->name, "libretro_log_level")) return 0;
}
else if (!strcmp(label, "libretro_log_level"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- Sets log level for libretro cores \n" "-- Sets log level for libretro cores \n"
"(GET_LOG_INTERFACE). \n" "(GET_LOG_INTERFACE). \n"
@ -800,15 +818,24 @@ void setting_data_get_description(const void *data, char *msg,
" WARN = 2\n" " WARN = 2\n"
" ERROR = 3" " ERROR = 3"
); );
else if (!strcmp(setting->name, "log_verbosity")) return 0;
}
else if (!strcmp(label, "log_verbosity"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- Enable or disable verbosity level \n" "-- Enable or disable verbosity level \n"
"of frontend."); "of frontend.");
else if (!strcmp(setting->name, "perfcnt_enable")) return 0;
}
else if (!strcmp(label, "perfcnt_enable"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- Enable or disable frontend \n" "-- Enable or disable frontend \n"
"performance counters."); "performance counters.");
else if (!strcmp(setting->name, "system_directory")) return 0;
}
else if (!strcmp(label, "system_directory"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- System Directory. \n" "-- System Directory. \n"
" \n" " \n"
@ -816,7 +843,10 @@ void setting_data_get_description(const void *data, char *msg,
"Implementations can query for this\n" "Implementations can query for this\n"
"directory to load BIOSes, \n" "directory to load BIOSes, \n"
"system-specific configs, etc."); "system-specific configs, etc.");
else if (!strcmp(setting->name, "rgui_show_start_screen")) return 0;
}
else if (!strcmp(label, "rgui_show_start_screen"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Show startup screen in menu.\n" " -- Show startup screen in menu.\n"
"Is automatically set to false when seen\n" "Is automatically set to false when seen\n"
@ -824,7 +854,10 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
"This is only updated in config if\n" "This is only updated in config if\n"
"'Config Save On Exit' is set to true.\n"); "'Config Save On Exit' is set to true.\n");
else if (!strcmp(setting->name, "config_save_on_exit")) return 0;
}
else if (!strcmp(label, "config_save_on_exit"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Flushes config to disk on exit.\n" " -- Flushes config to disk on exit.\n"
"Useful for menu as settings can be\n" "Useful for menu as settings can be\n"
@ -845,27 +878,42 @@ void setting_data_get_description(const void *data, char *msg,
"manually isn't really an option." "manually isn't really an option."
#endif #endif
); );
else if (!strcmp(setting->name, "core_specific_config")) return 0;
}
else if (!strcmp(label, "core_specific_config"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Load up a specific config file \n" " -- Load up a specific config file \n"
"based on the core being used.\n"); "based on the core being used.\n");
else if (!strcmp(setting->name, "video_scale")) return 0;
}
else if (!strcmp(label, "video_scale"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Fullscreen resolution.\n" " -- Fullscreen resolution.\n"
" \n" " \n"
"Resolution of 0 uses the \n" "Resolution of 0 uses the \n"
"resolution of the environment.\n"); "resolution of the environment.\n");
else if (!strcmp(setting->name, "video_vsync")) return 0;
}
else if (!strcmp(label, "video_vsync"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Video V-Sync.\n"); " -- Video V-Sync.\n");
else if (!strcmp(setting->name, "video_hard_sync")) return 0;
}
else if (!strcmp(label, "video_hard_sync"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Attempts to hard-synchronize \n" " -- Attempts to hard-synchronize \n"
"CPU and GPU.\n" "CPU and GPU.\n"
" \n" " \n"
"Can reduce latency at cost of \n" "Can reduce latency at cost of \n"
"performance."); "performance.");
else if (!strcmp(setting->name, "video_hard_sync_frames")) return 0;
}
else if (!strcmp(label, "video_hard_sync_frames"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Sets how many frames CPU can \n" " -- Sets how many frames CPU can \n"
"run ahead of GPU when using 'GPU \n" "run ahead of GPU when using 'GPU \n"
@ -876,7 +924,10 @@ void setting_data_get_description(const void *data, char *msg,
" 0: Syncs to GPU immediately.\n" " 0: Syncs to GPU immediately.\n"
" 1: Syncs to previous frame.\n" " 1: Syncs to previous frame.\n"
" 2: Etc ..."); " 2: Etc ...");
else if (!strcmp(setting->name, "video_frame_delay")) return 0;
}
else if (!strcmp(label, "video_frame_delay"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Sets how many milliseconds to delay\n" " -- Sets how many milliseconds to delay\n"
"after VSync before running the core.\n" "after VSync before running the core.\n"
@ -885,7 +936,10 @@ void setting_data_get_description(const void *data, char *msg,
"higher risk of stuttering.\n" "higher risk of stuttering.\n"
" \n" " \n"
"Maximum is 15."); "Maximum is 15.");
else if (!strcmp(setting->name, "audio_rate_control_delta")) return 0;
}
else if (!strcmp(label, "audio_rate_control_delta"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Audio rate control.\n" " -- Audio rate control.\n"
" \n" " \n"
@ -898,7 +952,10 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
" Input rate is defined as: \n" " Input rate is defined as: \n"
" input rate * (1.0 +/- (rate control delta))"); " input rate * (1.0 +/- (rate control delta))");
else if (!strcmp(setting->name, "video_filter")) return 0;
}
else if (!strcmp(label, "video_filter"))
{
#ifdef HAVE_FILTERS_BUILTIN #ifdef HAVE_FILTERS_BUILTIN
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- CPU-based video filter."); " -- CPU-based video filter.");
@ -908,9 +965,15 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
"Path to a dynamic library."); "Path to a dynamic library.");
#endif #endif
else if (!strcmp(setting->name, "video_fullscreen")) return 0;
}
else if (!strcmp(label, "video_fullscreen"))
{
snprintf(msg, sizeof_msg, " -- Toggles fullscreen."); snprintf(msg, sizeof_msg, " -- Toggles fullscreen.");
else if (!strcmp(setting->name, "audio_device")) return 0;
}
else if (!strcmp(label, "audio_device"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Override the default audio device \n" " -- Override the default audio device \n"
"the audio driver uses.\n" "the audio driver uses.\n"
@ -934,26 +997,35 @@ void setting_data_get_description(const void *data, char *msg,
"server." "server."
#endif #endif
); );
else if (!strcmp(setting->name, "video_black_frame_insertion")) return 0;
snprintf(msg, sizeof_msg, }
" -- Inserts a black frame inbetween \n" else if (!strcmp(label, "video_black_frame_insertion"))
"frames.\n" {
" \n" snprintf(msg, sizeof_msg,
"Useful for 120 Hz monitors who want to \n" " -- Inserts a black frame inbetween \n"
"play 60 Hz material with eliminated \n" "frames.\n"
"ghosting.\n" " \n"
" \n" "Useful for 120 Hz monitors who want to \n"
"Video refresh rate should still be \n" "play 60 Hz material with eliminated \n"
"configured as if it is a 60 Hz monitor \n" "ghosting.\n"
"(divide refresh rate by 2)."); " \n"
else if (!strcmp(setting->name, "video_threaded")) "Video refresh rate should still be \n"
"configured as if it is a 60 Hz monitor \n"
"(divide refresh rate by 2).");
return 0;
}
else if (!strcmp(label, "video_threaded"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Use threaded video driver.\n" " -- Use threaded video driver.\n"
" \n" " \n"
"Using this might improve performance at \n" "Using this might improve performance at \n"
"possible cost of latency and more video \n" "possible cost of latency and more video \n"
"stuttering."); "stuttering.");
else if (!strcmp(setting->name, "video_scale_integer")) return 0;
}
else if (!strcmp(label, "video_scale_integer"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Only scales video in integer \n" " -- Only scales video in integer \n"
"steps.\n" "steps.\n"
@ -963,14 +1035,20 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
"If Force Aspect is not set, X/Y will be \n" "If Force Aspect is not set, X/Y will be \n"
"integer scaled independently."); "integer scaled independently.");
else if (!strcmp(setting->name, "video_crop_overscan")) return 0;
}
else if (!strcmp(label, "video_crop_overscan"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Forces cropping of overscanned \n" " -- Forces cropping of overscanned \n"
"frames.\n" "frames.\n"
" \n" " \n"
"Exact behavior of this option is \n" "Exact behavior of this option is \n"
"core-implementation specific."); "core-implementation specific.");
else if (!strcmp(setting->name, "video_monitor_index")) return 0;
}
else if (!strcmp(label, "video_monitor_index"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Which monitor to prefer.\n" " -- Which monitor to prefer.\n"
" \n" " \n"
@ -978,7 +1056,10 @@ void setting_data_get_description(const void *data, char *msg,
"is preferred, 1 and up (1 being first \n" "is preferred, 1 and up (1 being first \n"
"monitor), suggests RetroArch to use that \n" "monitor), suggests RetroArch to use that \n"
"particular monitor."); "particular monitor.");
else if (!strcmp(setting->name, "video_rotation")) return 0;
}
else if (!strcmp(label, "video_rotation"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Forces a certain rotation \n" " -- Forces a certain rotation \n"
"of the screen.\n" "of the screen.\n"
@ -986,20 +1067,29 @@ void setting_data_get_description(const void *data, char *msg,
"The rotation is added to rotations which\n" "The rotation is added to rotations which\n"
"the libretro core sets (see Video Allow\n" "the libretro core sets (see Video Allow\n"
"Rotate)."); "Rotate).");
else if (!strcmp(setting->name, "audio_volume")) return 0;
}
else if (!strcmp(label, "audio_volume"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Audio volume, expressed in dB.\n" " -- Audio volume, expressed in dB.\n"
" \n" " \n"
" 0 dB is normal volume. No gain will be applied.\n" " 0 dB is normal volume. No gain will be applied.\n"
"Gain can be controlled in runtime with Input\n" "Gain can be controlled in runtime with Input\n"
"Volume Up / Input Volume Down."); "Volume Up / Input Volume Down.");
else if (!strcmp(setting->name, "block_sram_overwrite")) return 0;
}
else if (!strcmp(label, "block_sram_overwrite"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Block SRAM from being overwritten \n" " -- Block SRAM from being overwritten \n"
"when loading save states.\n" "when loading save states.\n"
" \n" " \n"
"Might potentially lead to buggy games."); "Might potentially lead to buggy games.");
else if (!strcmp(setting->name, "fastforward_ratio")) return 0;
}
else if (!strcmp(label, "fastforward_ratio"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Fastforward ratio." " -- Fastforward ratio."
" \n" " \n"
@ -1013,15 +1103,24 @@ void setting_data_get_description(const void *data, char *msg,
"the maximum rate will not be exceeded.\n" "the maximum rate will not be exceeded.\n"
"Do not rely on this cap to be perfectly \n" "Do not rely on this cap to be perfectly \n"
"accurate."); "accurate.");
else if (!strcmp(setting->name, "pause_nonactive")) return 0;
}
else if (!strcmp(label, "pause_nonactive"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Pause gameplay when window focus \n" " -- Pause gameplay when window focus \n"
"is lost."); "is lost.");
else if (!strcmp(setting->name, "video_gpu_screenshot")) return 0;
}
else if (!strcmp(label, "video_gpu_screenshot"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Screenshots output of GPU shaded \n" " -- Screenshots output of GPU shaded \n"
"material if available."); "material if available.");
else if (!strcmp(setting->name, "autosave_interval")) return 0;
}
else if (!strcmp(label, "autosave_interval"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Autosaves the non-volatile SRAM \n" " -- Autosaves the non-volatile SRAM \n"
"at a regular interval.\n" "at a regular interval.\n"
@ -1031,19 +1130,28 @@ void setting_data_get_description(const void *data, char *msg,
"seconds. \n" "seconds. \n"
" \n" " \n"
"A value of 0 disables autosave."); "A value of 0 disables autosave.");
else if (!strcmp(setting->name, "screenshot_directory")) return 0;
}
else if (!strcmp(label, "screenshot_directory"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Screenshot Directory. \n" " -- Screenshot Directory. \n"
" \n" " \n"
"Directory to dump screenshots to." "Directory to dump screenshots to."
); );
else if (!strcmp(setting->name, "video_swap_interval")) return 0;
}
else if (!strcmp(label, "video_swap_interval"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- VSync Swap Interval.\n" " -- VSync Swap Interval.\n"
" \n" " \n"
"Uses a custom swap interval for VSync. Set this \n" "Uses a custom swap interval for VSync. Set this \n"
"to effectively halve monitor refresh rate."); "to effectively halve monitor refresh rate.");
else if (!strcmp(setting->name, "video_refresh_rate_auto")) return 0;
}
else if (!strcmp(label, "video_refresh_rate_auto"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Refresh Rate Auto.\n" " -- Refresh Rate Auto.\n"
" \n" " \n"
@ -1062,17 +1170,23 @@ void setting_data_get_description(const void *data, char *msg,
"large pitch changes. If your monitor does \n" "large pitch changes. If your monitor does \n"
"not run at 60Hz, or something close to it, \n" "not run at 60Hz, or something close to it, \n"
"disable VSync, and leave this at its default."); "disable VSync, and leave this at its default.");
else if (!strcmp(setting->name, "savefile_directory")) return 0;
snprintf(msg, sizeof_msg, }
" -- Savefile Directory. \n" else if (!strcmp(label, "savefile_directory"))
" \n" {
"Save all save files (*.srm) to this \n" snprintf(msg, sizeof_msg,
"directory. This includes related files like \n" " -- Savefile Directory. \n"
".bsv, .rt, .psrm, etc...\n" " \n"
" \n" "Save all save files (*.srm) to this \n"
"This will be overridden by explicit command line\n" "directory. This includes related files like \n"
"options."); ".bsv, .rt, .psrm, etc...\n"
else if (!strcmp(setting->name, "savestate_directory")) " \n"
"This will be overridden by explicit command line\n"
"options.");
return 0;
}
else if (!strcmp(label, "savestate_directory"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Savestate Directory. \n" " -- Savestate Directory. \n"
" \n" " \n"
@ -1081,25 +1195,37 @@ void setting_data_get_description(const void *data, char *msg,
" \n" " \n"
"This will be overridden by explicit command line\n" "This will be overridden by explicit command line\n"
"options."); "options.");
else if (!strcmp(setting->name, "assets_directory")) return 0;
snprintf(msg, sizeof_msg, }
" -- Assets Directory. \n" else if (!strcmp(label, "assets_directory"))
" \n" {
" This location is queried by default when \n" snprintf(msg, sizeof_msg,
"menu interfaces try to look for loadable \n" " -- Assets Directory. \n"
"assets, etc."); " \n"
else if (!strcmp(setting->name, "slowmotion_ratio")) " This location is queried by default when \n"
"menu interfaces try to look for loadable \n"
"assets, etc.");
return 0;
}
else if (!strcmp(label, "slowmotion_ratio"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Slowmotion ratio." " -- Slowmotion ratio."
" \n" " \n"
"When slowmotion, content will slow\n" "When slowmotion, content will slow\n"
"down by factor."); "down by factor.");
else if (!strcmp(setting->name, "input_axis_threshold")) return 0;
}
else if (!strcmp(label, "input_axis_threshold"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Defines axis threshold.\n" " -- Defines axis threshold.\n"
" \n" " \n"
" Possible values are [0.0, 1.0]."); " Possible values are [0.0, 1.0].");
else if (!strcmp(setting->name, "rewind_granularity")) return 0;
}
else if (!strcmp(label, "rewind_granularity"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Rewind granularity.\n" " -- Rewind granularity.\n"
" \n" " \n"
@ -1107,27 +1233,42 @@ void setting_data_get_description(const void *data, char *msg,
"frames, you can rewind several frames \n" "frames, you can rewind several frames \n"
"at a time, increasing the rewinding \n" "at a time, increasing the rewinding \n"
"speed."); "speed.");
else if (!strcmp(setting->name, "rewind_enable")) return 0;
}
else if (!strcmp(label, "rewind_enable"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Enable rewinding.\n" " -- Enable rewinding.\n"
" \n" " \n"
"This will take a performance hit, \n" "This will take a performance hit, \n"
"so it is disabled by default."); "so it is disabled by default.");
else if (!strcmp(setting->name, "input_autodetect_enable")) return 0;
}
else if (!strcmp(label, "input_autodetect_enable"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Enable input auto-detection.\n" " -- Enable input auto-detection.\n"
" \n" " \n"
"Will attempt to auto-configure \n" "Will attempt to auto-configure \n"
"joypads, Plug-and-Play style."); "joypads, Plug-and-Play style.");
else if (!strcmp(setting->name, "camera_allow")) return 0;
}
else if (!strcmp(label, "camera_allow"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Allow or disallow camera access by \n" " -- Allow or disallow camera access by \n"
"cores."); "cores.");
else if (!strcmp(setting->name, "location_allow")) return 0;
}
else if (!strcmp(label, "location_allow"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Allow or disallow location services \n" " -- Allow or disallow location services \n"
"access by cores."); "access by cores.");
else if (!strcmp(setting->name, "savestate_auto_save")) return 0;
}
else if (!strcmp(label, "savestate_auto_save"))
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
" -- Automatically saves a savestate at the \n" " -- Automatically saves a savestate at the \n"
"end of RetroArch's lifetime.\n" "end of RetroArch's lifetime.\n"
@ -1135,9 +1276,148 @@ void setting_data_get_description(const void *data, char *msg,
"RetroArch will automatically load any savestate\n" "RetroArch will automatically load any savestate\n"
"with this path on startup if 'Savestate Auto\n" "with this path on startup if 'Savestate Auto\n"
"Load' is set."); "Load' is set.");
return 0;
}
else 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;
}
else if (!strcmp(label, "video_shader_preset"))
{
snprintf(msg, sizeof_msg,
" -- Load Shader Preset. \n"
" \n"
" Load a "
#ifdef HAVE_CG
"Cg"
#endif
#ifdef HAVE_GLSL
#ifdef HAVE_CG
"/"
#endif
"GLSL"
#endif
#ifdef HAVE_HLSL
#if defined(HAVE_CG) || defined(HAVE_HLSL)
"/"
#endif
"HLSL"
#endif
" preset directly. \n"
"The menu shader menu is updated accordingly. \n"
" \n"
"If the CGP uses scaling methods which are not \n"
"simple, (i.e. source scaling, same scaling \n"
"factor for X/Y), the scaling factor displayed \n"
"in the menu might not be correct."
);
return 0;
}
else if (!strcmp(label, "video_shader_num_passes"))
{
snprintf(msg, sizeof_msg,
" -- Shader Passes. \n"
" \n"
"RetroArch allows you to mix and match various \n"
"shaders with arbitrary shader passes, with \n"
"custom hardware filters and scale factors. \n"
" \n"
"This option specifies the number of shader \n"
"passes to use. If you set this to 0, and use \n"
"Apply Shader Changes, you use a 'blank' shader. \n"
" \n"
"The Default Filter option will affect the \n"
"stretching filter.");
return 0;
}
else if (!strcmp(label, "video_shader_parameters"))
{
snprintf(msg, sizeof_msg,
"-- Shader Parameters. \n"
" \n"
"Modifies current shader directly. Will not be \n"
"saved to CGP/GLSLP preset file.");
return 0;
}
else if (!strcmp(label, "video_shader_preset_parameters"))
{
snprintf(msg, sizeof_msg,
"-- Shader Preset Parameters. \n"
" \n"
"Modifies shader preset currently in menu."
);
return 0;
}
else if (!strcmp(label, "video_shader_pass"))
{
snprintf(msg, sizeof_msg,
" -- Path to shader. \n"
" \n"
"All shaders must be of the same \n"
"type (i.e. CG, GLSL or HLSL). \n"
" \n"
"Set Shader Directory to set where \n"
"the browser starts to look for \n"
"shaders."
);
return 0;
}
else if (!strcmp(label, "video_shader_filter_pass"))
{
snprintf(msg, sizeof_msg,
" -- Hardware filter for this pass. \n"
" \n"
"If 'Don't Care' is set, 'Default \n"
"Filter' will be used."
);
return 0;
}
else if (!strcmp(label, "video_shader_scale_pass"))
{
snprintf(msg, sizeof_msg,
" -- Scale for this pass. \n"
" \n"
"The scale factor accumulates, i.e. 2x \n"
"for first pass and 2x for second pass \n"
"will give you a 4x total scale. \n"
" \n"
"If there is a scale factor for last \n"
"pass, the result is stretched to \n"
"screen with the filter specified in \n"
"'Default Filter'. \n"
" \n"
"If 'Don't Care' is set, either 1x \n"
"scale or stretch to fullscreen will \n"
"be used depending if it's not the last \n"
"pass or not."
);
return 0;
}
else else
{
snprintf(msg, sizeof_msg, snprintf(msg, sizeof_msg,
"-- No info on this item is available. --\n"); "-- No info on this item is available. --\n");
return 0;
}
return -1;
} }
static void general_read_handler(const void *data) static void general_read_handler(const void *data)

View File

@ -166,7 +166,7 @@ rarch_setting_t setting_data_bind_setting(const char* name,
const struct retro_keybind* default_value, const char *group, const struct retro_keybind* default_value, const char *group,
const char *subgroup); const char *subgroup);
void setting_data_get_description(const void *data, char *msg, int setting_data_get_description(const char *label, char *msg,
size_t msg_sizeof); size_t msg_sizeof);
#ifdef HAVE_MENU #ifdef HAVE_MENU