Get rid of gx_strcpy_resolution

This commit is contained in:
twinaphex 2014-10-16 18:35:30 +02:00
parent fd718def87
commit 933408a8e4
2 changed files with 5 additions and 10 deletions

View File

@ -291,7 +291,7 @@ CGprogramGroup rglCgCreateProgramGroup( CGcontext ctx, const char *name, void *
group->name = ( char* )malloc( len + 1 );
if ( !group->name )//out of memory
break;
strcpy( group->name, name );
strlcpy( group->name, name, sizeof(group->name));
}
//copy the default values

View File

@ -2050,14 +2050,6 @@ static void menu_common_setting_set_label_perf(char *type_str,
#if defined(GEKKO)
extern unsigned menu_gx_resolutions[][2];
extern unsigned menu_current_gx_resolution;
static void gx_strcpy_resolution(char *type_str, size_t type_str_size)
{
snprintf(type_str, type_str_size, "%.3ux%.3u%c",
menu_gx_resolutions[menu_current_gx_resolution][0],
menu_gx_resolutions[menu_current_gx_resolution][1],
menu_gx_resolutions[menu_current_gx_resolution][1] > 300 ? 'i' : 'p');
}
#endif
static int get_fallback_label(char *type_str,
@ -2070,7 +2062,10 @@ static int get_fallback_label(char *type_str,
{
#if defined(GEKKO)
case MENU_SETTINGS_VIDEO_RESOLUTION:
gx_strcpy_resolution(type_str, type_str_size);
snprintf(type_str, type_str_size, "%.3ux%.3u%c",
menu_gx_resolutions[menu_current_gx_resolution][0],
menu_gx_resolutions[menu_current_gx_resolution][1],
menu_gx_resolutions[menu_current_gx_resolution][1] > 300 ? 'i' : 'p');
break;
#elif defined(__CELLOS_LV2__)
case MENU_SETTINGS_VIDEO_RESOLUTION: