MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / InitVideoOptionsMenu

Function InitVideoOptionsMenu

neo/framework/Dhewm3SettingsMenu.cpp:1837–1862  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1835}
1836
1837static void InitVideoOptionsMenu()
1838{
1839 InitOptions( videoOptionsImmediately, IM_ARRAYSIZE(videoOptionsImmediately) );
1840
1841 vidModes.SetNum(0, false);
1842
1843 // modes 0-2 are not shown in the menu, probably too small
1844 for( int m=3; ; ++m ) {
1845 int w=0, h=0;
1846 if( ! R_GetModeInfo(&w, &h, m) )
1847 break;
1848 vidModes.Append( VidMode(w, h, m) );
1849 }
1850
1851 std::sort( vidModes.begin(), vidModes.end(), [](const VidMode& v1, const VidMode& v2) -> bool {
1852 return v1.width < v2.width || (v1.width == v2.width && v1.height < v2.height);
1853 } );
1854
1855 vidModes.Insert( VidMode(0, 0, -1), 0 );
1856
1857 for ( VidMode& vm : vidModes ) {
1858 vm.Init();
1859 }
1860
1861 SetVideoStuffFromCVars();
1862}
1863
1864static void DrawVideoOptionsMenu()
1865{

Callers 1

InitDhewm3SettingsMenuFunction · 0.85

Calls 10

InitOptionsFunction · 0.85
R_GetModeInfoFunction · 0.85
VidModeClass · 0.85
SetVideoStuffFromCVarsFunction · 0.85
SetNumMethod · 0.45
AppendMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
InsertMethod · 0.45
InitMethod · 0.45

Tested by

no test coverage detected