Compare commits

...
9 Commits
13 changed files with 100 additions and 12 deletions
+4 -4
View File
@@ -84,7 +84,7 @@ private:
return false;
}
static HMODULE LoadLibraryAHook(LPCSTR lpLibFileName)
static HMODULE WINAPI LoadLibraryAHook(LPCSTR lpLibFileName)
{
if (lpLibFileName && isImageBlacklistedA(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@@ -94,7 +94,7 @@ private:
return s_RealLoadLibraryA(lpLibFileName);
}
static HMODULE LoadLibraryWHook(LPCWSTR lpLibFileName)
static HMODULE WINAPI LoadLibraryWHook(LPCWSTR lpLibFileName)
{
if (lpLibFileName && isImageBlacklistedW(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@@ -104,7 +104,7 @@ private:
return s_RealLoadLibraryW(lpLibFileName);
}
static HMODULE LoadLibraryExAHook(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
static HMODULE WINAPI LoadLibraryExAHook(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
if (lpLibFileName && isImageBlacklistedA(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
@@ -114,7 +114,7 @@ private:
return s_RealLoadLibraryExA(lpLibFileName, hFile, dwFlags);
}
static HMODULE LoadLibraryExWHook(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
static HMODULE WINAPI LoadLibraryExWHook(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
if (lpLibFileName && isImageBlacklistedW(lpLibFileName)) {
SetLastError(ERROR_ACCESS_DISABLED_BY_POLICY);
+2 -2
View File
@@ -23,9 +23,9 @@
<key>NSSupportsAutomaticGraphicsSwitching</key>
<true/>
<key>CFBundleVersion</key>
<string>0.6.1</string>
<string>0.6.2</string>
<key>CFBundleShortVersionString</key>
<string>0.6.1</string>
<string>0.6.2</string>
<key>CFBundleDisplayName</key>
<string>Moonlight</string>
</dict>
+2 -2
View File
@@ -315,5 +315,5 @@ macx {
QMAKE_BUNDLE_DATA += APP_BUNDLE_RESOURCES
}
VERSION = 0.6.1
DEFINES += VERSION_STR=\\\"0.6.1\\\"
VERSION = 0.6.2
DEFINES += VERSION_STR=\\\"0.6.2\\\"
+13
View File
@@ -2,6 +2,9 @@
#include "nvhttp.h"
#include "settings/streamingpreferences.h"
#include <Limelight.h>
#include <QtEndian>
#include <QThread>
#include <QThreadPool>
@@ -573,6 +576,16 @@ private:
// Update addresses depending on the context
if (m_Mdns) {
newComputer->localAddress = m_Address;
// Get the WAN IP address using STUN if we're on mDNS
quint32 addr;
int err = LiFindExternalAddressIP4("stun.stunprotocol.org", 3478, &addr);
if (err == 0) {
newComputer->remoteAddress = QHostAddress(qFromBigEndian(addr)).toString();
}
else {
qWarning() << "STUN failed to get WAN address:" << err;
}
}
else {
newComputer->manualAddress = m_Address;
@@ -33,6 +33,19 @@
</screenshots>
<releases>
<release version="0.6.2" date="2018-10-28">
<description>
<p>New features:</p>
<ul>
<li>Added automatic IP address detection for Internet streaming</li>
<li>Added a quit shortcut tip for gamepad users</li>
</ul>
<p>Bugfixes:</p>
<ul>
<li>Fixed server state polling not being stopped while streaming</li>
</ul>
</description>
</release>
<release version="0.6.1" date="2018-10-14">
<description>
<p>New features:</p>
+17 -1
View File
@@ -3,6 +3,7 @@ import QtQuick.Controls 2.2
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.2
import SdlGamepadKeyNavigation 1.0
import Session 1.0
Item {
@@ -58,11 +59,26 @@ Item {
toast.visible = true
}
// It's important that we don't call enable() here
// or it may interfere with the Session instance
// getting notified of initial connected gamepads.
SdlGamepadKeyNavigation {
id: gamepadKeyNav
}
onVisibleChanged: {
if (visible) {
// Hide the toolbar before we start loading
toolBar.visible = false
// Set the hint text. We do this here rather than
// in the hintText control itself to synchronize
// with Session.exec() which requires no concurrent
// gamepad usage.
hintText.text = gamepadKeyNav.getConnectedGamepads() > 0 ?
"Tip: Press Start+Select+L1+R1 to disconnect your session" :
"Tip: Press Ctrl+Alt+Shift+Q to disconnect your session"
// Hook up our signals
session.stageStarting.connect(stageStarting)
session.stageFailed.connect(stageFailed)
@@ -118,7 +134,7 @@ Item {
}
Label {
text: "Tip: Press Ctrl+Alt+Shift+Q to disconnect your session"
id: hintText
anchors.bottom: parent.bottom
anchors.bottomMargin: 50
anchors.horizontalCenter: parent.horizontalCenter
+23
View File
@@ -89,6 +89,29 @@ ApplicationWindow {
}
}
onVisibleChanged: {
// When we become invisible while streaming is going on,
// stop polling immediately.
if (!visible) {
inactivityTimer.stop()
if (pollingActive) {
ComputerManager.stopPollingAsync()
pollingActive = false
}
}
else if (active) {
// When we become visible and active again, start polling
inactivityTimer.stop()
// Restart polling if it was stopped
if (!pollingActive) {
ComputerManager.startPolling()
pollingActive = true
}
}
}
onActiveChanged: {
if (active) {
// Stop the inactivity timer
+20
View File
@@ -244,3 +244,23 @@ void SdlGamepadKeyNavigation::setSettingsMode(bool settingsMode)
{
m_SettingsMode = settingsMode;
}
int SdlGamepadKeyNavigation::getConnectedGamepads()
{
if (SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) != 0) {
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
"SDL_InitSubSystem(SDL_INIT_GAMECONTROLLER) failed: %s",
SDL_GetError());
return 0;
}
int count = 0;
for (int i = 0; i < SDL_NumJoysticks(); i++) {
if (SDL_IsGameController(i)) {
count++;
}
}
SDL_QuitSubSystem(SDL_INIT_GAMECONTROLLER);
return count;
}
+2
View File
@@ -20,6 +20,8 @@ public:
Q_INVOKABLE void setSettingsMode(bool settingsMode);
Q_INVOKABLE int getConnectedGamepads();
private:
void sendKey(QEvent::Type type, Qt::Key key, Qt::KeyboardModifiers modifiers = Qt::NoModifier);
@@ -56,6 +56,7 @@ SOURCES += \
$$COMMON_C_DIR/src/RtspConnection.c \
$$COMMON_C_DIR/src/RtspParser.c \
$$COMMON_C_DIR/src/SdpGenerator.c \
$$COMMON_C_DIR/src/SimpleStun.c \
$$COMMON_C_DIR/src/VideoDepacketizer.c \
$$COMMON_C_DIR/src/VideoStream.c
HEADERS += \
+1 -1
View File
@@ -15,7 +15,7 @@
Name="$(var.FullName)"
Language="1033"
Version="!(bind.fileVersion.MoonlightExe)"
Manufacturer="Moonlight Game Streaming Team"
Manufacturer="Moonlight Game Streaming Project"
UpgradeCode="5c09f94e-f809-4c6a-9b7b-597c99f041fe">
<Package InstallerVersion="500" Compressed="yes" InstallScope="perMachine" />
+1 -1
View File
@@ -6,7 +6,7 @@
<Bundle Name="Moonlight Game Streaming Client"
Version="!(bind.PackageVersion.Moonlight)"
Manufacturer="Moonlight Game Streaming Team"
Manufacturer="Moonlight Game Streaming Project"
UpgradeCode="466fa35d-4be4-40ef-9ce5-afadc3b63bc5"
HelpUrl="https://github.com/moonlight-stream/moonlight-docs/wiki/Setup-Guide"
UpdateUrl="https://github.com/moonlight-stream/moonlight-qt/releases"