FIXED XAudio2 config dialog did not show current device OnInitDialog

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@591 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
spacy51 2008-07-26 11:55:22 +00:00
parent ffc67dc551
commit da26ffa229
1 changed files with 11 additions and 3 deletions

View File

@ -137,11 +137,19 @@ BOOL XAudio2_Config::OnInitDialog()
}
}
}
if( m_combo_dev.GetCount() > 0 ) {
if( m_selected_device_index < (UINT32)(m_combo_dev.GetCount()) ) {
m_combo_dev.SetCurSel( m_selected_device_index );
// select the currently configured device {
int count = m_combo_dev.GetCount();
if( count > 0 ) {
for( int i = 0; i < count; i++ ) {
if( m_combo_dev.GetItemData( i ) == m_selected_device_index ) {
m_combo_dev.SetCurSel( i );
break;
}
}
}
// }
}
xa->Release();
xa = NULL;