(settings data) Move over more help info messages

This commit is contained in:
twinaphex 2014-07-27 05:53:10 +02:00
parent 672ddd078c
commit fcbd97390f
2 changed files with 174 additions and 119 deletions

View File

@ -646,93 +646,45 @@ static int menu_info_screen_iterate(unsigned action)
break; break;
case MENU_SETTINGS_VIDEO_WINDOW_SCALE_X: case MENU_SETTINGS_VIDEO_WINDOW_SCALE_X:
case MENU_SETTINGS_VIDEO_WINDOW_SCALE_Y: case MENU_SETTINGS_VIDEO_WINDOW_SCALE_Y:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_xscale")) ||
" -- Fullscreen resolution.\n" (current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_xscale")) )
" \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"Resolution of 0 uses the \n"
"resolution of the environment.\n");
break; break;
case MENU_SETTINGS_VIDEO_VSYNC: case MENU_SETTINGS_VIDEO_VSYNC:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_vsync")))
" -- Video V-Sync.\n"); setting_data_get_description(current_setting, msg, sizeof(msg));
break; break;
case MENU_SETTINGS_VIDEO_HARD_SYNC: case MENU_SETTINGS_VIDEO_HARD_SYNC:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_hard_sync")))
" -- Attempts to hard-synchronize \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"CPU and GPU.\n"
" \n"
"Can reduce latency at cost of \n"
"performance.");
break; break;
case MENU_SETTINGS_VIDEO_HARD_SYNC_FRAMES: case MENU_SETTINGS_VIDEO_HARD_SYNC_FRAMES:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_hard_sync_frames")))
" -- Sets how many frames CPU can \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"run ahead of GPU when using 'GPU \n"
"Hard Sync'.\n"
" \n"
"Maximum is 3.\n"
" \n"
" 0: Syncs to GPU immediately.\n"
" 1: Syncs to previous frame.\n"
" 2: Etc ...");
break; break;
case MENU_SETTINGS_VIDEO_BLACK_FRAME_INSERTION: case MENU_SETTINGS_VIDEO_BLACK_FRAME_INSERTION:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_black_frame_insertion")))
" -- Inserts a black frame inbetween \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"frames.\n"
" \n"
"Useful for 120 Hz monitors who want to \n"
"play 60 Hz material with eliminated \n"
"ghosting.\n"
" \n"
"Video refresh rate should still be \n"
"configured as if it is a 60 Hz monitor \n"
"(divide refresh rate by 2).");
break; break;
case MENU_SETTINGS_VIDEO_THREADED: case MENU_SETTINGS_VIDEO_THREADED:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_threaded")))
" -- Use threaded video driver.\n" setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
"Using this might improve performance at \n"
"possible cost of latency and more video \n"
"stuttering.");
break; break;
case MENU_SETTINGS_VIDEO_INTEGER_SCALE: case MENU_SETTINGS_VIDEO_INTEGER_SCALE:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_scale_integer")))
" -- Only scales video in integer \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"steps.\n"
" \n"
"The base size depends on system-reported \n"
"geometry and aspect ratio.\n"
" \n"
"If Force Aspect is not set, X/Y will be \n"
"integer scaled independently.");
break; break;
case MENU_SETTINGS_VIDEO_CROP_OVERSCAN: case MENU_SETTINGS_VIDEO_CROP_OVERSCAN:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_crop_overscan")))
" -- Forces cropping of overscanned \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"frames.\n"
" \n"
"Exact behavior of this option is \n"
"core-implementation specific.");
break; break;
case MENU_SETTINGS_VIDEO_MONITOR_INDEX: case MENU_SETTINGS_VIDEO_MONITOR_INDEX:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_monitor_index")))
" -- Which monitor to prefer.\n" setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
"0 (default) means no particular monitor \n"
"is preferred, 1 and up (1 being first \n"
"monitor), suggests RetroArch to use that \n"
"particular monitor.");
break; break;
case MENU_SETTINGS_VIDEO_ROTATION: case MENU_SETTINGS_VIDEO_ROTATION:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_rotation")))
" -- Forces a certain rotation \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"of the screen.\n"
" \n"
"The rotation is added to rotations which\n"
"the libretro core sets (see Video Allow\n"
"Rotate).");
break; break;
case MENU_SETTINGS_AUDIO_CONTROL_RATE_DELTA: case MENU_SETTINGS_AUDIO_CONTROL_RATE_DELTA:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
@ -749,12 +701,8 @@ static int menu_info_screen_iterate(unsigned action)
" input rate * (1.0 +/- (rate control delta))"); " input rate * (1.0 +/- (rate control delta))");
break; break;
case MENU_SETTINGS_AUDIO_VOLUME: case MENU_SETTINGS_AUDIO_VOLUME:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "audio_volume")))
" -- Audio volume, expressed in dB.\n" setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
" 0 dB is normal volume. No gain will be applied.\n"
"Gain can be controlled in runtime with Input\n"
"Volume Up / Input Volume Down.");
break; break;
case MENU_SETTINGS_VIDEO_SOFTFILTER: case MENU_SETTINGS_VIDEO_SOFTFILTER:
#ifdef HAVE_FILTERS_BUILTIN #ifdef HAVE_FILTERS_BUILTIN
@ -768,11 +716,8 @@ static int menu_info_screen_iterate(unsigned action)
#endif #endif
break; break;
case MENU_SETTINGS_BLOCK_SRAM_OVERWRITE: case MENU_SETTINGS_BLOCK_SRAM_OVERWRITE:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "block_sram_overwrite")))
" -- Block SRAM from being overwritten \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"when loading save states.\n"
" \n"
"Might potentially lead to buggy games.");
break; break;
case MENU_SETTINGS_PRIVACY_CAMERA_ALLOW: case MENU_SETTINGS_PRIVACY_CAMERA_ALLOW:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
@ -980,47 +925,24 @@ static int menu_info_screen_iterate(unsigned action)
"down by factor."); "down by factor.");
break; break;
case MENU_SETTINGS_FASTFORWARD_RATIO: case MENU_SETTINGS_FASTFORWARD_RATIO:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "fastforward_ratio")))
" -- Fastforward ratio." setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
"The maximum rate at which content will\n"
"be run when using fast forward.\n"
" \n"
" (E.g. 5.0 for 60 fps content => 300 fps \n"
"cap).\n"
" \n"
"RetroArch will go to sleep to ensure that \n"
"the maximum rate will not be exceeded.\n"
"Do not rely on this cap to be perfectly \n"
"accurate.");
break; break;
case MENU_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST: case MENU_SETTINGS_PAUSE_IF_WINDOW_FOCUS_LOST:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "pause_nonactive")))
" -- Pause gameplay when window focus \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"is lost.");
break; break;
case MENU_SETTINGS_GPU_SCREENSHOT: case MENU_SETTINGS_GPU_SCREENSHOT:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_gpu_screenshot")))
" -- Screenshots output of GPU shaded \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"material if available.");
break; break;
case MENU_SETTINGS_SRAM_AUTOSAVE: case MENU_SETTINGS_SRAM_AUTOSAVE:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "autosave_interval")))
" -- Autosaves the non-volatile SRAM \n" setting_data_get_description(current_setting, msg, sizeof(msg));
"at a regular interval.\n"
" \n"
"This is disabled by default unless set \n"
"otherwise. The interval is measured in \n"
"seconds. \n"
" \n"
"A value of 0 disables autosave.");
break; break;
case MENU_SCREENSHOT_DIR_PATH: case MENU_SCREENSHOT_DIR_PATH:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "screenshot_directory")))
" -- Screenshot Directory. \n" setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
"Directory to dump screenshots to."
);
break; break;
case MENU_SETTINGS_DRIVER_AUDIO_DEVICE: case MENU_SETTINGS_DRIVER_AUDIO_DEVICE:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),
@ -1065,11 +987,8 @@ static int menu_info_screen_iterate(unsigned action)
"Load' is set."); "Load' is set.");
break; break;
case MENU_SETTINGS_VIDEO_SWAP_INTERVAL: case MENU_SETTINGS_VIDEO_SWAP_INTERVAL:
snprintf(msg, sizeof(msg), if ((current_setting = (rarch_setting_t*)setting_data_find_setting(setting_data, "video_swap_interval")))
" -- VSync Swap Interval.\n" setting_data_get_description(current_setting, msg, sizeof(msg));
" \n"
"Uses a custom swap interval for VSync. Set this \n"
"to effectively halve monitor refresh rate.");
break; break;
case MENU_SETTINGS_VIDEO_REFRESH_RATE_AUTO: case MENU_SETTINGS_VIDEO_REFRESH_RATE_AUTO:
snprintf(msg, sizeof(msg), snprintf(msg, sizeof(msg),

View File

@ -491,7 +491,143 @@ void setting_data_get_description(const void *data, char *msg, size_t sizeof_msg
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_xscale") ||
!strcmp(setting->name, "video_yscale"))
snprintf(msg, sizeof_msg,
" -- Fullscreen resolution.\n"
" \n"
"Resolution of 0 uses the \n"
"resolution of the environment.\n");
else if (!strcmp(setting->name, "video_vsync"))
snprintf(msg, sizeof_msg,
" -- Video V-Sync.\n");
else if (!strcmp(setting->name, "video_hard_sync"))
snprintf(msg, sizeof_msg,
" -- Attempts to hard-synchronize \n"
"CPU and GPU.\n"
" \n"
"Can reduce latency at cost of \n"
"performance.");
else if (!strcmp(setting->name, "video_hard_sync_frames"))
snprintf(msg, sizeof_msg,
" -- Sets how many frames CPU can \n"
"run ahead of GPU when using 'GPU \n"
"Hard Sync'.\n"
" \n"
"Maximum is 3.\n"
" \n"
" 0: Syncs to GPU immediately.\n"
" 1: Syncs to previous frame.\n"
" 2: Etc ...");
else if (!strcmp(setting->name, "video_black_frame_insertion"))
snprintf(msg, sizeof_msg,
" -- Inserts a black frame inbetween \n"
"frames.\n"
" \n"
"Useful for 120 Hz monitors who want to \n"
"play 60 Hz material with eliminated \n"
"ghosting.\n"
" \n"
"Video refresh rate should still be \n"
"configured as if it is a 60 Hz monitor \n"
"(divide refresh rate by 2).");
else if (!strcmp(setting->name, "video_threaded"))
snprintf(msg, sizeof_msg,
" -- Use threaded video driver.\n"
" \n"
"Using this might improve performance at \n"
"possible cost of latency and more video \n"
"stuttering.");
else if (!strcmp(setting->name, "video_scale_integer"))
snprintf(msg, sizeof_msg,
" -- Only scales video in integer \n"
"steps.\n"
" \n"
"The base size depends on system-reported \n"
"geometry and aspect ratio.\n"
" \n"
"If Force Aspect is not set, X/Y will be \n"
"integer scaled independently.");
else if (!strcmp(setting->name, "video_crop_overscan"))
snprintf(msg, sizeof_msg,
" -- Forces cropping of overscanned \n"
"frames.\n"
" \n"
"Exact behavior of this option is \n"
"core-implementation specific.");
else if (!strcmp(setting->name, "video_monitor_index"))
snprintf(msg, sizeof_msg,
" -- Which monitor to prefer.\n"
" \n"
"0 (default) means no particular monitor \n"
"is preferred, 1 and up (1 being first \n"
"monitor), suggests RetroArch to use that \n"
"particular monitor.");
else if (!strcmp(setting->name, "video_rotation"))
snprintf(msg, sizeof_msg,
" -- Forces a certain rotation \n"
"of the screen.\n"
" \n"
"The rotation is added to rotations which\n"
"the libretro core sets (see Video Allow\n"
"Rotate).");
else if (!strcmp(setting->name, "audio_volume"))
snprintf(msg, sizeof_msg,
" -- Audio volume, expressed in dB.\n"
" \n"
" 0 dB is normal volume. No gain will be applied.\n"
"Gain can be controlled in runtime with Input\n"
"Volume Up / Input Volume Down.");
else if (!strcmp(setting->name, "block_sram_overwrite"))
snprintf(msg, sizeof_msg,
" -- Block SRAM from being overwritten \n"
"when loading save states.\n"
" \n"
"Might potentially lead to buggy games.");
else if (!strcmp(setting->name, "fastforward_ratio"))
snprintf(msg, sizeof_msg,
" -- Fastforward ratio."
" \n"
"The maximum rate at which content will\n"
"be run when using fast forward.\n"
" \n"
" (E.g. 5.0 for 60 fps content => 300 fps \n"
"cap).\n"
" \n"
"RetroArch will go to sleep to ensure that \n"
"the maximum rate will not be exceeded.\n"
"Do not rely on this cap to be perfectly \n"
"accurate.");
else if (!strcmp(setting->name, "pause_nonactive"))
snprintf(msg, sizeof_msg,
" -- Pause gameplay when window focus \n"
"is lost.");
else if (!strcmp(setting->name, "video_gpu_screenshot"))
snprintf(msg, sizeof_msg,
" -- Screenshots output of GPU shaded \n"
"material if available.");
else if (!strcmp(setting->name, "autosave_interval"))
snprintf(msg, sizeof_msg,
" -- Autosaves the non-volatile SRAM \n"
"at a regular interval.\n"
" \n"
"This is disabled by default unless set \n"
"otherwise. The interval is measured in \n"
"seconds. \n"
" \n"
"A value of 0 disables autosave.");
else if (!strcmp(setting->name, "screenshot_directory"))
snprintf(msg, sizeof_msg,
" -- Screenshot Directory. \n"
" \n"
"Directory to dump screenshots to."
);
else if (!strcmp(setting->name, "video_swap_interval"))
snprintf(msg, sizeof_msg,
" -- VSync Swap Interval.\n"
" \n"
"Uses a custom swap interval for VSync. Set this \n"
"to effectively halve monitor refresh rate.");
} }
static void general_read_handler(const void *data) static void general_read_handler(const void *data)