diff --git a/OpenRCT2Launcher.pro b/OpenRCT2Launcher.pro index b0173f5..d57969d 100644 --- a/OpenRCT2Launcher.pro +++ b/OpenRCT2Launcher.pro @@ -4,12 +4,14 @@ # #------------------------------------------------- -QT += core gui widgets network multimedia +QT += core gui widgets network + +!contains(DEFINES, NO_LIST_AUDIO_DEVICES): QT += multimedia TARGET = OpenRCT2 TEMPLATE = app -VERSION = 0.0.3 +VERSION = 0.0.4 SOURCES += main.cpp\ @@ -44,8 +46,8 @@ CONFIG += c++11 DEFINES += APP_VERSION=\\\"$$VERSION\\\" -macx:ICON = Icon/OpenRCT2.icns -win32:RC_FILE = Icon/OpenRCT2Launcher.rc +macx: ICON = Icon/OpenRCT2.icns +win32: RC_FILE = Icon/OpenRCT2Launcher.rc # Use Qt5's Zlib if avaiable, otherwise use system's exists($$[QT_INSTALL_PREFIX]/include/QtZlib) { diff --git a/configuration.cpp b/configuration.cpp index d135443..7ce30cb 100644 --- a/configuration.cpp +++ b/configuration.cpp @@ -3,11 +3,14 @@ #include "configuration_data.h" #include "platform.h" -#include #include #include #include +#ifndef NO_LIST_AUDIO_DEVICES +#include +#endif + Configuration::Configuration(QString file, QWidget *parent) : QDialog(parent), ui(new Ui::Configuration), @@ -69,10 +72,20 @@ Configuration::Configuration(QString file, QWidget *parent) : } { +#ifdef NO_LIST_AUDIO_DEVICES + QVariant cvalue = config.value(QStringLiteral("sound/audio_device")); + if (cvalue.isValid()) { + QString value = cvalue.toString(); + if (!value.isEmpty()) { + ui->soundDevices->addItem(value, value); + } + } +#else QList outputDevices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput); for (QAudioDeviceInfo &info : outputDevices) { ui->soundDevices->addItem(info.deviceName(), info.deviceName()); } +#endif } { diff --git a/installer.iss b/installer.iss index e36a494..0b230a0 100644 --- a/installer.iss +++ b/installer.iss @@ -2,7 +2,7 @@ ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! #define MyAppName "OpenRCT2 Launcher" -#define MyAppVersion "0.0.3" +#define MyAppVersion "0.0.4" #define MyAppPublisher "OpenRCT2" #define MyAppURL "http://www.github.com/LRFLEW/OpenRCT2Launcher" #define MyAppExeName "OpenRCT2.exe"