summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRJ Ryan <rryan@mixxx.org>2015-12-19 20:50:13 -0500
committerRJ Ryan <rryan@mixxx.org>2015-12-19 20:50:13 -0500
commitae1a4836204daf20f8b121808470d3027d71cc86 (patch)
tree51195d688a3cd4a5352c35b458ec89476a81b38e /src
parent063a85601a2f24b3e1aa16b35ebd4dc2fbe93fd5 (diff)
Use output device name when an input device is not provided.
Diffstat (limited to 'src')
-rw-r--r--src/controllers/midi/portmidicontroller.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/controllers/midi/portmidicontroller.cpp b/src/controllers/midi/portmidicontroller.cpp
index 68d35b7d8f..e5b7c1fde8 100644
--- a/src/controllers/midi/portmidicontroller.cpp
+++ b/src/controllers/midi/portmidicontroller.cpp
@@ -32,12 +32,16 @@ PortMidiController::PortMidiController(const PmDeviceInfo* inputDeviceInfo,
// Note: We prepend the input stream's index to the device's name to prevent
// duplicate devices from causing mayhem.
//setDeviceName(QString("%1. %2").arg(QString::number(m_iInputDeviceIndex), inputDeviceInfo->name));
- setDeviceName(QString("%1").arg(inputDeviceInfo->name));
if (m_pInputDeviceInfo) {
+ setDeviceName(QString("%1").arg(m_pInputDeviceInfo->name));
setInputDevice(m_pInputDeviceInfo->input);
}
if (m_pOutputDeviceInfo) {
+ // In the event of an output-only device, use the output device name.
+ if (m_pInputDeviceInfo == NULL) {
+ setDeviceName(QString("%1").arg(m_pOutputDeviceInfo->name));
+ }
setOutputDevice(m_pOutputDeviceInfo->output);
}
}