diff --git a/main.cpp b/main.cpp index 57d1c49..777bb6c 100644 --- a/main.cpp +++ b/main.cpp @@ -126,6 +126,7 @@ void* MoonlightInstance::ConnectionThreadFunc(void* context) { LiInitializeServerInformation(&serverInfo); serverInfo.address = me->m_Host.c_str(); serverInfo.serverInfoAppVersion = me->m_AppVersion.c_str(); + serverInfo.serverInfoGfeVersion = me->m_GfeVersion.c_str(); err = LiStartConnection(&serverInfo, &me->m_StreamConfig, @@ -195,6 +196,7 @@ void MoonlightInstance::HandleStartStream(int32_t callbackId, pp::VarArray args) std::string rikey = args.Get(5).AsString(); std::string rikeyid = args.Get(6).AsString(); std::string appversion = args.Get(7).AsString(); + std::string gfeversion = args.Get(8).AsString(); pp::Var response("Setting stream width to: " + width); PostMessage(response); @@ -212,6 +214,8 @@ void MoonlightInstance::HandleStartStream(int32_t callbackId, pp::VarArray args) PostMessage(response); response = ("Setting appversion to: " + appversion); PostMessage(response); + response = ("Setting gfeversion to: " + gfeversion); + PostMessage(response); // Populate the stream configuration LiInitializeStreamConfiguration(&m_StreamConfig); @@ -231,6 +235,7 @@ void MoonlightInstance::HandleStartStream(int32_t callbackId, pp::VarArray args) // Store the parameters from the start message m_Host = host; m_AppVersion = appversion; + m_GfeVersion = gfeversion; // Initialize the rendering surface before starting the connection if (InitializeRenderingSurface(m_StreamConfig.width, m_StreamConfig.height)) { diff --git a/moonlight.hpp b/moonlight.hpp index e2d1e1a..e3de5ba 100644 --- a/moonlight.hpp +++ b/moonlight.hpp @@ -165,6 +165,7 @@ class MoonlightInstance : public pp::Instance, public pp::MouseLock { std::string m_Host; std::string m_AppVersion; + std::string m_GfeVersion; STREAM_CONFIGURATION m_StreamConfig; bool m_Running; diff --git a/static/js/index.js b/static/js/index.js index 576528c..8d6162a 100644 --- a/static/js/index.js +++ b/static/js/index.js @@ -701,7 +701,7 @@ function startGame(host, appID) { } sendMessage('startRequest', [host.address, streamWidth, streamHeight, frameRate, - bitrate.toString(), rikey, rikeyid.toString(), host.appVersion + bitrate.toString(), rikey, rikeyid.toString(), host.appVersion, host.gfeVersion ]); }, function(failedResumeApp) { console.eror('%c[index.js, startGame]', 'color:green;', 'Failed to resume the app! Returned error was' + failedResumeApp);