moonlight-stream / moonlight-embedded

Gamestream client for embedded systems
https://github.com/moonlight-stream/moonlight-embedded/wiki
GNU General Public License v3.0
1.5k stars 325 forks source link

-app command only works once per reboot #698

Closed jasonxbergman closed 5 years ago

jasonxbergman commented 5 years ago

Please provide the following info.

NVidia Geforce Experience version: 3.15.0.186 Moonlight Embedded version: 2.4.7 Moonlight Embedded source: jessie main Moonlight Embedded running on: Raspberry Pi Moonlight Embedded running on distribution: Raspbian

Verbose output -verbose of Moonlight Embedded: (Not pasting in, because everything works normally)

What is the expected result?

My launch parameters are:

moonlight stream -verbose -app "Pinball FX3" -audio default --fps 60 192.168.1.55

I expect it to start the stream and launch Pinball FX3.

What happens instead of that?

It works!

...but only once. If I quit the stream (via the keyboard shortcut) and try again, it will stream, but drop me on the desktop (where I can manually launch the game and it works just fine).

If I reboot the machine, it will work fine the one time, but subsequent launches drop me to the desktop.

Doing -app Steam works every time. It's when I specify anything else that it only works once per reboot. It's very weird.

(Update: doing -app Steam doesn't work either. It was only appearing that way because I was leaving Steam running. Specifying an app only seems to work once per reboot, regardless of the app)

I'm trying to set this up on my arcade cabinet, which has a 4:3 monitor. Since Steam's Big Picture doesn't support 4:3 resolutions, the only way to get it to display those games properly is to bypass Steam. This works great, but I really want to be able to have it reliably launch an app other than steam (that way I can have multiple shell scripts, one for each game I want to stream).

I suspect this may be a GFE quirk, not Moonlight, but I figured I'd post here just in case there's a workaround.

jasonxbergman commented 5 years ago

I came up with a working solution!

It's a total kludge, but I created an AutoHotKey app that I call with Moonlight that calls the actual game, waits for it to close, and then kills the nvstreamer.exe task. Because I'm killing the task every time, the next time I run moonlight, it launches the app using the -app command.

Again, total kludge, but it works great.

If anyone cares, here's the AHK lines I use:

-- Run C:\Program Files (x86)\Steam\steamapps\common\Pinball FX3\Pinball FX3.exe Sleep 20000 Process, WaitClose, Pinball FX3.exe Run *runas %comspec% /c "taskkill /F /IM nvstreamer.exe /T"