mirror of
https://github.com/86Box/86Box.git
synced 2026-02-22 09:35:32 -07:00
Qt: Display names of internal sound/video devices when possible
This commit is contained in:
@@ -106,6 +106,9 @@ SettingsDisplay::onCurrentMachineChanged(int machineId)
|
||||
}
|
||||
|
||||
if (video_card_available(c) && device_is_valid(video_dev, machineId)) {
|
||||
if (c == 1 && machine_get_vid_device(machineId)) {
|
||||
name += QString(" (%1)").arg(DeviceConfig::DeviceName(machine_get_vid_device(machineId), machine_get_vid_device(machineId)->internal_name, 0));
|
||||
}
|
||||
int row = Models::AddEntry(model, name, c);
|
||||
if (c == curVideoCard) {
|
||||
selectedRow = row - removeRows;
|
||||
|
||||
@@ -89,8 +89,8 @@ SettingsSound::onCurrentMachineChanged(const int machineId)
|
||||
|
||||
c = 0;
|
||||
while (true) {
|
||||
const QString name = DeviceConfig::DeviceName(sound_card_getdevice(c),
|
||||
sound_card_get_internal_name(c), 1);
|
||||
QString name = DeviceConfig::DeviceName(sound_card_getdevice(c),
|
||||
sound_card_get_internal_name(c), 1);
|
||||
|
||||
if (name.isEmpty())
|
||||
break;
|
||||
@@ -99,6 +99,9 @@ SettingsSound::onCurrentMachineChanged(const int machineId)
|
||||
if (device_is_valid(sound_card_getdevice(c), machineId)) {
|
||||
for (uint8_t i = 0; i < SOUND_CARD_MAX; ++i) {
|
||||
if ((c != 1) || ((i == 0) && m_has_snd)) {
|
||||
if (i == 0 && c == 1 && m_has_snd && machine_get_snd_device(machineId)) {
|
||||
name += QString(" (%1)").arg(DeviceConfig::DeviceName(machine_get_snd_device(machineId), machine_get_snd_device(machineId)->internal_name, 0));
|
||||
}
|
||||
int row = Models::AddEntry(models[i], name, c);
|
||||
|
||||
if (c == sound_card_current[i])
|
||||
|
||||
Reference in New Issue
Block a user