Skip to content

Commit

Permalink
Macro'd use of QtMultimedia and updated version number
Browse files Browse the repository at this point in the history
  • Loading branch information
LRFLEW committed Feb 22, 2016
1 parent 057583d commit f3a45a7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
10 changes: 6 additions & 4 deletions OpenRCT2Launcher.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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\
Expand Down Expand Up @@ -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) {
Expand Down
15 changes: 14 additions & 1 deletion configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
#include "configuration_data.h"
#include "platform.h"

#include <QAudioDeviceInfo>
#include <QDir>
#include <QFileDialog>
#include <QScreen>

#ifndef NO_LIST_AUDIO_DEVICES
#include <QAudioDeviceInfo>
#endif

Configuration::Configuration(QString file, QWidget *parent) :
QDialog(parent),
ui(new Ui::Configuration),
Expand Down Expand Up @@ -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<QAudioDeviceInfo> outputDevices = QAudioDeviceInfo::availableDevices(QAudio::AudioOutput);
for (QAudioDeviceInfo &info : outputDevices) {
ui->soundDevices->addItem(info.deviceName(), info.deviceName());
}
#endif
}

{
Expand Down
2 changes: 1 addition & 1 deletion installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f3a45a7

Please sign in to comment.