(RMenu PS3) Move reslution code over to menu_settings.c

This commit is contained in:
twinaphex 2013-10-06 23:29:50 +00:00
parent 62271ec540
commit 371dd802e8
2 changed files with 11 additions and 8 deletions

View File

@ -1072,12 +1072,19 @@ void menu_set_settings_label(char *type_str, size_t type_str_size, unsigned *w,
case RGUI_SETTINGS_VIDEO_ASPECT_RATIO:
strlcpy(type_str, aspectratio_lut[g_settings.video.aspect_ratio_idx].name, type_str_size);
break;
#ifdef GEKKO
#if defined(GEKKO)
case RGUI_SETTINGS_VIDEO_RESOLUTION:
strlcpy(type_str, gx_get_video_mode(), type_str_size);
break;
#elif defined(__CELLOS_LV2__)
case RGUI_SETTINGS_VIDEO_RESOLUTION:
{
unsigned width = gfx_ctx_get_resolution_width(g_extern.console.screen.resolutions.list[g_extern.console.screen.resolutions.current.idx]);
unsigned height = gfx_ctx_get_resolution_height(g_extern.console.screen.resolutions.list[g_extern.console.screen.resolutions.current.idx]);
snprintf(type_str, type_str_size, "%dx%d", width, height);
}
break;
#endif
case RGUI_FILE_PLAIN:
strlcpy(type_str, "(FILE)", type_str_size);
*w = 6;

View File

@ -1417,12 +1417,8 @@ static int select_setting(void *data, uint64_t action)
{
#ifdef __CELLOS_LV2__
case SETTING_CHANGE_RESOLUTION:
{
unsigned width = gfx_ctx_get_resolution_width(g_extern.console.screen.resolutions.list[g_extern.console.screen.resolutions.current.idx]);
unsigned height = gfx_ctx_get_resolution_height(g_extern.console.screen.resolutions.list[g_extern.console.screen.resolutions.current.idx]);
strlcpy(text, "Resolution", sizeof(text));
snprintf(setting_text, sizeof(setting_text), "%dx%d", width, height);
}
strlcpy(text, "Resolution", sizeof(text));
menu_set_settings_label(setting_text, sizeof(setting_text), &w, settings_lut[i]);
break;
case SETTING_PAL60_MODE:
strlcpy(text, "PAL60 Mode", sizeof(text));