(Multi-Monitor)Hide "display index" Option If Single Display

-The "display index" option will now no longer show up in the "VIDEO" menu if user only has a single display
This commit is contained in:
Spirrwell 2019-06-16 17:35:55 -04:00
parent fc78aefee3
commit 39728eb5d4
1 changed files with 16 additions and 7 deletions

View File

@ -427,12 +427,15 @@ VID_MenuInit(void)
s_mode_list.curvalue = GetCustomValue(&s_mode_list);
}
s_display_list.generic.type = MTYPE_SPINCONTROL;
s_display_list.generic.name = "display index";
s_display_list.generic.x = 0;
s_display_list.generic.y = (y += 10);
s_display_list.itemnames = GLimp_GetDisplayIndices();
s_display_list.curvalue = GLimp_GetWindowDisplayIndex();
if (GLimp_GetNumVideoDisplays() > 1)
{
s_display_list.generic.type = MTYPE_SPINCONTROL;
s_display_list.generic.name = "display index";
s_display_list.generic.x = 0;
s_display_list.generic.y = (y += 10);
s_display_list.itemnames = GLimp_GetDisplayIndices();
s_display_list.curvalue = GLimp_GetWindowDisplayIndex();
}
s_brightness_slider.generic.type = MTYPE_SLIDER;
s_brightness_slider.generic.name = "brightness";
@ -539,7 +542,13 @@ VID_MenuInit(void)
Menu_AddItem(&s_opengl_menu, (void *)&s_renderer_list);
Menu_AddItem(&s_opengl_menu, (void *)&s_mode_list);
Menu_AddItem(&s_opengl_menu, (void *)&s_display_list);
// only show this option if we have multiple displays
if (GLimp_GetNumVideoDisplays() > 1)
{
Menu_AddItem(&s_opengl_menu, (void *)&s_display_list);
}
Menu_AddItem(&s_opengl_menu, (void *)&s_brightness_slider);
Menu_AddItem(&s_opengl_menu, (void *)&s_fov_slider);
Menu_AddItem(&s_opengl_menu, (void *)&s_uiscale_list);