Skip to content

Commit f3a45a7

Browse files
committed
Macro'd use of QtMultimedia and updated version number
1 parent 057583d commit f3a45a7

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

OpenRCT2Launcher.pro

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@
44
#
55
#-------------------------------------------------
66

7-
QT += core gui widgets network multimedia
7+
QT += core gui widgets network
8+
9+
!contains(DEFINES, NO_LIST_AUDIO_DEVICES): QT += multimedia
810

911
TARGET = OpenRCT2
1012
TEMPLATE = app
1113

12-
VERSION = 0.0.3
14+
VERSION = 0.0.4
1315

1416

1517
SOURCES += main.cpp\
@@ -44,8 +46,8 @@ CONFIG += c++11
4446

4547
DEFINES += APP_VERSION=\\\"$$VERSION\\\"
4648

47-
macx:ICON = Icon/OpenRCT2.icns
48-
win32:RC_FILE = Icon/OpenRCT2Launcher.rc
49+
macx: ICON = Icon/OpenRCT2.icns
50+
win32: RC_FILE = Icon/OpenRCT2Launcher.rc
4951

5052
# Use Qt5's Zlib if avaiable, otherwise use system's
5153
exists($$[QT_INSTALL_PREFIX]/include/QtZlib) {

configuration.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33
#include "configuration_data.h"
44
#include "platform.h"
55

6-
#include <QAudioDeviceInfo>
76
#include <QDir>
87
#include <QFileDialog>
98
#include <QScreen>
109

10+
#ifndef NO_LIST_AUDIO_DEVICES
11+
#include <QAudioDeviceInfo>
12+
#endif
13+
1114
Configuration::Configuration(QString file, QWidget *parent) :
1215
QDialog(parent),
1316
ui(new Ui::Configuration),
@@ -69,10 +72,20 @@ Configuration::Configuration(QString file, QWidget *parent) :
6972
}
7073

7174
{
75+
#ifdef NO_LIST_AUDIO_DEVICES
76+
QVariant cvalue = config.value(QStringLiteral("sound/audio_device"));
77+
if (cvalue.isValid()) {
78+
QString value = cvalue.toString();
79+
if (!value.isEmpty()) {
80+
ui->soundDevices->addItem(value, value);
81+
}
82+
}
83+
#else
7284
QList<QAudioDeviceInfo> outputDevices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
7385
for (QAudioDeviceInfo &info : outputDevices) {
7486
ui->soundDevices->addItem(info.deviceName(), info.deviceName());
7587
}
88+
#endif
7689
}
7790

7891
{

installer.iss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "OpenRCT2 Launcher"
5-
#define MyAppVersion "0.0.3"
5+
#define MyAppVersion "0.0.4"
66
#define MyAppPublisher "OpenRCT2"
77
#define MyAppURL "http://www.github.com/LRFLEW/OpenRCT2Launcher"
88
#define MyAppExeName "OpenRCT2.exe"

0 commit comments

Comments
 (0)