From 88d1d0abf7f6fc08e5b6f0333fd342bb7dddc3a7 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sun, 31 Oct 2021 11:16:17 +0100 Subject: [PATCH] MainWindow: if not specified on the command line look for a default fftw-wisdom file in the default application data location --- sdrgui/mainwindow.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index e776b6c5e..0c90df667 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -28,6 +28,7 @@ #include #include #include +#include #include "device/devicegui.h" #include "device/deviceapi.h" @@ -180,7 +181,20 @@ MainWindow::MainWindow(qtwebapp::LoggerWithFile *logger, const MainParser& parse splash->showStatusMessage("allocate FFTs...", Qt::white); splash->showStatusMessage("allocate FFTs...", Qt::white); - m_dspEngine->createFFTFactory(parser.getFFTWFWisdomFileName()); + + if (parser.getFFTWFWisdomFileName().length() != 0) + { + m_dspEngine->createFFTFactory(parser.getFFTWFWisdomFileName()); + } + else + { + QString defaultFFTWWisdomFile = QStandardPaths::locate(QStandardPaths::AppDataLocation, "fftw-wisdom"); + + if (defaultFFTWWisdomFile.length() != 0) { + m_dspEngine->createFFTFactory(defaultFFTWWisdomFile); + } + } + m_dspEngine->preAllocateFFTs(); splash->showStatusMessage("load settings...", Qt::white);