Update vsync list after user interaction
The vsync may immediately fallback to another option after change from the user so the UI should reflect that. Todo: show a popup in UI informing the user why their desired vsync option couldn't be set. Right now the error message is visible only from the logs.pyro-refactor
parent
71ff89a803
commit
a7aaa07356
|
@ -293,6 +293,7 @@ void CScreenSetupDisplay::UpdateApply()
|
|||
CWindow* pw;
|
||||
CButton* pb;
|
||||
CList* pl;
|
||||
CList* pvl;
|
||||
CCheck* pc;
|
||||
int sel2;
|
||||
bool bFull;
|
||||
|
@ -309,6 +310,22 @@ void CScreenSetupDisplay::UpdateApply()
|
|||
pc = static_cast<CCheck*>(pw->SearchControl(EVENT_INTERFACE_FULL));
|
||||
bFull = pc->TestState(STATE_CHECK);
|
||||
|
||||
pvl = static_cast<CList*>(pw->SearchControl(EVENT_INTERFACE_VSYNC));
|
||||
if (pvl == nullptr) return;
|
||||
|
||||
switch (m_engine->GetVSync())
|
||||
{
|
||||
case -1: //Adaptive?
|
||||
pvl->SetSelect(1);
|
||||
break;
|
||||
case 0: //Off?
|
||||
pvl->SetSelect(0);
|
||||
break;
|
||||
case 1: //On?
|
||||
pvl->SetSelect(2);
|
||||
break;
|
||||
}
|
||||
|
||||
if ( sel2 == m_setupSelMode &&
|
||||
bFull == m_setupFull )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue