Sync state of video overlay Qt widgets in a periodic update to ensure that hot key functions do not get window out of sync with state.

This commit is contained in:
mjbudd77 2021-08-09 22:19:19 -04:00
parent 49534e8f4b
commit 87a99e50dc
2 changed files with 18 additions and 0 deletions

View File

@ -527,6 +527,12 @@ void ConsoleVideoConfDialog_t::periodicUpdate(void)
regionSelect->setCurrentIndex(actRegion);
}
setComboBoxFromValue( inputDisplaySel, input_display );
showFrameCount_cbx->setChecked( frame_display );
showLagCount_cbx->setChecked( lagCounterDisplay );
showRerecordCount_cbx->setChecked( rerecord_display );
// Update Window Size Readouts
updateReadouts();
}
@ -668,6 +674,17 @@ void ConsoleVideoConfDialog_t::setComboBoxFromProperty( QComboBox *cbx, const c
}
}
//----------------------------------------------------
void ConsoleVideoConfDialog_t::setComboBoxFromValue( QComboBox *cbx, int pval )
{
for (int i=0; i<cbx->count(); i++)
{
if ( pval == cbx->itemData(i).toInt() )
{
cbx->setCurrentIndex(i); break;
}
}
}
//----------------------------------------------------
void ConsoleVideoConfDialog_t::openGL_linearFilterChanged( int value )
{
bool opt = (value != Qt::Unchecked);

View File

@ -67,6 +67,7 @@ class ConsoleVideoConfDialog_t : public QDialog
void setCheckBoxFromProperty( QCheckBox *cbx, const char *property );
void setComboBoxFromProperty( QComboBox *cbx, const char *property );
void setComboBoxFromValue( QComboBox *cbx, int pval );
//void setSliderFromProperty( QSlider *slider, QLabel *lbl, const char *property );
void resetVideo(void);