Skip to content

Commit

Permalink
Refactor Steam Link support files
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Mar 23, 2019
1 parent b78a797 commit 2bf3f1b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
12 changes: 7 additions & 5 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,16 @@ libvdpau {
SOURCES += streaming/video/ffmpeg-renderers/vdpau.cpp
HEADERS += streaming/video/ffmpeg-renderers/vdpau.h
}
config_SLVideo {
message(SLVideo decoder/renderer selected)
config_SL {
message(Steam Link build configuration selected)

DEFINES += HAVE_SLVIDEO
DEFINES += STEAM_LINK HAVE_SLVIDEO
LIBS += -lSLVideo

SOURCES += streaming/video/sl.cpp
HEADERS += streaming/video/sl.h
SOURCES += \
streaming/video/slvid.cpp
HEADERS += \
streaming/video/slvid.h
}
win32:!winrt {
message(DXVA2 renderer selected)
Expand Down
4 changes: 2 additions & 2 deletions app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ int main(int argc, char *argv[])
// Register custom metatypes for use in signals
qRegisterMetaType<NvApp>("NvApp");

#ifdef HAVE_SLVIDEO
#ifdef STEAM_LINK
// Steam Link requires that we initialize video before creating our
// QGuiApplication in order to configure the framebuffer correctly.
if (SDL_InitSubSystem(SDL_INIT_VIDEO) != 0) {
Expand All @@ -331,7 +331,7 @@ int main(int argc, char *argv[])
app.setPalette(QPalette(Qt::lightGray));
#endif

#ifdef HAVE_SLVIDEO
#ifdef STEAM_LINK
// Qt 5.9 from the Steam Link SDK is not able to load any fonts
// since the Steam Link doesn't include any of the ones it looks
// for. We know it has NotoSans so we will explicitly ask for that.
Expand Down
2 changes: 1 addition & 1 deletion app/streaming/session.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endif

#ifdef HAVE_SLVIDEO
#include "video/sl.h"
#include "video/slvid.h"
#endif

#ifdef Q_OS_WIN32
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "sl.h"
#include "slvid.h"

SLVideoDecoder::SLVideoDecoder(bool)
: m_VideoContext(nullptr),
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions config.tests/SL/SL.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SOURCES = main.cpp
LIBS += -lSLVideo -lSLAudio

2 changes: 2 additions & 0 deletions config.tests/SLVideo/main.cpp → config.tests/SL/main.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include <SLVideo.h>
#include <SLAudio.h>

int main()
{
SLVideo_CreateContext();
SLAudio_CreateContext();
return 0;
}
3 changes: 0 additions & 3 deletions config.tests/SLVideo/SLVideo.pro

This file was deleted.

2 changes: 1 addition & 1 deletion moonlight-qt.pro
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ CONFIG += debug_and_release

# Run our compile tests
load(configure)
qtCompileTest(SLVideo)
qtCompileTest(SL)

0 comments on commit 2bf3f1b

Please sign in to comment.