Work around C89 limitations

This commit is contained in:
twinaphex 2015-09-22 13:47:59 +02:00
parent 21ab9bbeee
commit 8e2b04d556

View File

@ -1541,7 +1541,11 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
switch (hash)
{
case MENU_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING_DESC:
snprintf(s, len,
{
/* Work around C89 limitations */
char u[501];
char t[501];
strlcpy(u,
"RetroArch relies on an unique form of\n"
"audio/video synchronization where it needs to be\n"
"calibrated against the refresh rate of your\n"
@ -1550,7 +1554,8 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
"If you experience any audio crackling or video\n"
"tearing, usually it means that you need to\n"
"calibrate the settings. Some choices below:\n"
" \n"
" \n", sizeof(u));
snprintf(t, sizeof(t),
"a) Go to '%s' -> '%s', and enable\n"
"'Threaded Video'. Refresh rate will not matter\n"
"in this mode, framerate will be higher,\n"
@ -1562,8 +1567,10 @@ int menu_hash_get_help_us(uint32_t hash, char *s, size_t len)
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SETTINGS),
menu_hash_to_str(MENU_LABEL_VALUE_SETTINGS),
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_SETTINGS),
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO)
);
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO));
strlcat(s, u, len);
strlcat(s, t, len);
}
break;
case MENU_LABEL_VALUE_HELP_SCANNING_CONTENT_DESC:
snprintf(s, len,