FIXED XAudio2 config dialog did not show current device OnInitDialog
This commit is contained in:
parent
160759bcb6
commit
e4c1506dc5
|
@ -137,12 +137,20 @@ BOOL XAudio2_Config::OnInitDialog()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( m_combo_dev.GetCount() > 0 ) {
|
|
||||||
if( m_selected_device_index < (UINT32)(m_combo_dev.GetCount()) ) {
|
// select the currently configured device {
|
||||||
m_combo_dev.SetCurSel( m_selected_device_index );
|
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->Release();
|
||||||
xa = NULL;
|
xa = NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue