diff --git a/gfx/gx/gx_gfx.c b/gfx/gx/gx_gfx.c index 6738b0600a..07ff527364 100644 --- a/gfx/gx/gx_gfx.c +++ b/gfx/gx/gx_gfx.c @@ -310,15 +310,6 @@ void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines) g_current_framebuf = 0; } -const char *gx_get_video_mode(void) -{ - static char format[16]; - snprintf(format, sizeof(format), "%.3ux%.3u%c", - gx_mode.fbWidth, gx_mode.efbHeight, - (gx_mode.viTVMode & 3) == VI_INTERLACE ? 'i' : 'p'); - return format; -} - static void gx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx) { gx_video_t *gx = (gx_video_t*)driver.video_data; diff --git a/settings_data.c b/settings_data.c index 8b6a3b9ee5..6420f1f527 100644 --- a/settings_data.c +++ b/settings_data.c @@ -1731,6 +1731,19 @@ static void menu_common_setting_set_label_perf(char *type_str, *w = 0; } +#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, size_t type_str_size, unsigned *w, unsigned type, const char *menu_label, const char *label, unsigned index) @@ -1741,7 +1754,7 @@ static int get_fallback_label(char *type_str, { #if defined(GEKKO) case MENU_SETTINGS_VIDEO_RESOLUTION: - strlcpy(type_str, gx_get_video_mode(), type_str_size); + gx_strcpy_resolution(type_str, type_str_size); break; #elif defined(__CELLOS_LV2__) case MENU_SETTINGS_VIDEO_RESOLUTION: