File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed
Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -435,18 +435,29 @@ class COptionsSubVideoAdvancedDlg : public vgui::Frame
435435 m_pColorCorrection->SetEnabled ( mat_dxlevel.GetInt () >= 90 );
436436 m_pMotionBlur->SetEnabled ( mat_dxlevel.GetInt () >= 90 );
437437
438- if ( g_pCVar->FindVar ( " fov_desired" ) == NULL )
438+ if ( ConVar* fovVar = g_pCVar->FindVar ( " fov_desired" ) )
439439 {
440- Panel * pFOV = FindChildByName ( " FovSlider" );
441- if ( pFOV )
440+ CCvarSlider* pFOV = (CCvarSlider*) FindChildByName (" FovSlider" );
441+ if (pFOV)
442442 {
443- pFOV->SetVisible ( false );
443+ float minVar, maxVar;
444+ fovVar->GetMin (minVar);
445+ fovVar->GetMax (maxVar);
446+ pFOV->SetMinMaxValues (max (75 .0f , minVar), maxVar);
447+ }
448+ }
449+ else
450+ {
451+ Panel* pFOV = FindChildByName (" FovSlider" );
452+ if (pFOV)
453+ {
454+ pFOV->SetVisible (false );
444455 }
445456
446- pFOV = FindChildByName ( " FovLabel" );
447- if ( pFOV )
457+ pFOV = FindChildByName (" FovLabel" );
458+ if (pFOV)
448459 {
449- pFOV->SetVisible ( false );
460+ pFOV->SetVisible (false );
450461 }
451462 }
452463
You can’t perform that action at this time.
0 commit comments