diff options
| author | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2026-10-09 14:12:49 +0200 |
| commit | 76956486fa7ef52a51d4e56df1e13a9f19a6c93c (patch) | |
| tree | fe0c394439fdc167d1970372e8998874090854dd /map65/devsetup.cpp | |
| parent | 0685fcada9f95fe90f70b387cd7d757da8209624 (diff) | |
| parent | ffc62c792c9a5196cb4ce7a353287dfe20db6524 (diff) | |
Update upstream source from tag 'upstream/3.3.0_beta1+dfsg'
Update to upstream version '3.3.0~beta1+dfsg'
with Debian dir 85037bbb9376721108594b59b54ead82ac6924a3
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") |
