diff options
| author | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
|---|---|---|
| committer | Dave Hibberd <hibby@debian.org> | 2026-10-20 22:35:06 +0100 |
| commit | 82ebb1ed1af30cee4dfbb1c628431d32885a00e0 (patch) | |
| tree | 1a1f782d3e576b758be0bc61171574a7cd8f2376 /map65/devsetup.cpp | |
| parent | 061658210acb6425517733ea012dda803a7f72a1 (diff) | |
| parent | 61d684922b0f1c8455cc60eb3d123df058c9e1f5 (diff) | |
Merge tag 'debian/3.3.0_beta2+dfsg-1' into hibbian/trixie-backports
tagging wsjtx 3.3.0~beta2+dfsg-1
Diffstat (limited to 'map65/devsetup.cpp')
| -rw-r--r-- | map65/devsetup.cpp | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/map65/devsetup.cpp b/map65/devsetup.cpp index 4fae12ea..3815c6ca 100644 --- a/map65/devsetup.cpp +++ b/map65/devsetup.cpp @@ -12,12 +12,7 @@ #include <QSignalBlocker> #include <QSettings> #include "SettingsGroup.hpp" - -#if !defined(Q_OS_WIN) -extern "C" { - void ptt_set_override(const char *path); -} -#endif +#include "libm65/ptt.h" static QStringList enumeratePorts() { @@ -215,17 +210,13 @@ for (id = 0; id < numDevices; id++) { // restore saved selection QString saved = mw->m_pttPath; int idx = ui.pttComboBox->findText(saved); + if (idx < 0) { + ui.pttComboBox->addItem(saved); + idx = ui.pttComboBox->count() - 1; + } if (idx >= 0) ui.pttComboBox->setCurrentIndex(idx); - // backend override (Linux/macOS only) - #if !defined(Q_OS_WIN) - if (ui.pttComboBox->currentText() != "NONE") - ptt_set_override(ui.pttComboBox->currentText().toUtf8().constData()); - else - ptt_set_override(nullptr); - #endif - if (mw->m_fs96000 == 2) oldSampleRate = 192000; else if (mw->m_fs96000 == 1) @@ -336,10 +327,12 @@ void DevSetup::accept() mw->m_idInt=ui.idIntSpinBox->value(); mw->m_pttPath = ui.pttComboBox->currentText(); - if (mw->m_pttPath.startsWith("COM")) - mw->m_pttPortNumber = mw->m_pttPath.mid(3).toInt(); - else - mw->m_pttPortNumber = 1; + if (mw->m_pttPath == "NONE") + mw->m_pttPortNumber = 0; + else if (mw->m_pttPath.startsWith("COM")) + mw->m_pttPortNumber = mw->m_pttPath.mid(3).toInt(); + else + mw->m_pttPortNumber = 1; #if !defined(Q_OS_WIN) if (ui.pttComboBox->currentText() != "NONE") |
