mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-10 05:33:14 +00:00
Get rid of gx_strcpy_resolution
This commit is contained in:
parent
fd718def87
commit
933408a8e4
@ -291,7 +291,7 @@ CGprogramGroup rglCgCreateProgramGroup( CGcontext ctx, const char *name, void *
|
|||||||
group->name = ( char* )malloc( len + 1 );
|
group->name = ( char* )malloc( len + 1 );
|
||||||
if ( !group->name )//out of memory
|
if ( !group->name )//out of memory
|
||||||
break;
|
break;
|
||||||
strcpy( group->name, name );
|
strlcpy( group->name, name, sizeof(group->name));
|
||||||
}
|
}
|
||||||
|
|
||||||
//copy the default values
|
//copy the default values
|
||||||
|
@ -2050,14 +2050,6 @@ static void menu_common_setting_set_label_perf(char *type_str,
|
|||||||
#if defined(GEKKO)
|
#if defined(GEKKO)
|
||||||
extern unsigned menu_gx_resolutions[][2];
|
extern unsigned menu_gx_resolutions[][2];
|
||||||
extern unsigned menu_current_gx_resolution;
|
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
|
#endif
|
||||||
|
|
||||||
static int get_fallback_label(char *type_str,
|
static int get_fallback_label(char *type_str,
|
||||||
@ -2070,7 +2062,10 @@ static int get_fallback_label(char *type_str,
|
|||||||
{
|
{
|
||||||
#if defined(GEKKO)
|
#if defined(GEKKO)
|
||||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
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;
|
break;
|
||||||
#elif defined(__CELLOS_LV2__)
|
#elif defined(__CELLOS_LV2__)
|
||||||
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
case MENU_SETTINGS_VIDEO_RESOLUTION:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user