Playnite: Parameter for FullscreenApp.exe Call to Kill DesktopMode.exe

Created on 15 Aug 2019  路  8Comments  路  Source: JosefNemec/Playnite

I would like an exe parameter for the FullscreenApp version of the exe to automatically terminate any existing instance of the DesktopApp. This helps with calling from SteamLink via a shortcut.

enhancement

Most helpful comment

I use Playnite on my local machine all the time, but sometimes I want to stream to my living room with SteamLink. I have Playnite as a shortcut on that steamlink, and it launches the Fullscreen mode fine, as long as the Desktop mode is not already running. So the ability to make one version kill the other version would be useful to me, though I recognize, not the default use-case.

Edit: Or better yet, when you attempt to launch FullscreenMode, and an instance of Playnite is already running in desktop mode, it could detect that and trigger the switch to Fullscreen mode.

All 8 comments

I don't understand the use case here. Why not just start Playnite in Fullscreen mode in the first place?

I use Playnite on my local machine all the time, but sometimes I want to stream to my living room with SteamLink. I have Playnite as a shortcut on that steamlink, and it launches the Fullscreen mode fine, as long as the Desktop mode is not already running. So the ability to make one version kill the other version would be useful to me, though I recognize, not the default use-case.

Edit: Or better yet, when you attempt to launch FullscreenMode, and an instance of Playnite is already running in desktop mode, it could detect that and trigger the switch to Fullscreen mode.

+1 on this issue. My use case :

  • My PC starts with Playnite in Desktop mode
  • I'd like to be able to create in moonlight or Steam Link, a single shortcut that would either start playnite if not started (this can already be done), or trigger to full screen mode if already started
  • Basically I guess it'd be a parameter that would do what the "switch to fullscreen" button does

This leaves the exit behaviour (how to exit from moonlight or steam link from playnite, ideally to get back to desktop mode) but that's another problem in itself and it's mainly concerning the streaming app and not so much playnite.

I've solved it for my setup with a dirty bat script, I'm leaving it below if anyone is interested.

It does :

  • Kill Playnite Desktop if any is still opened
  • Start Playnite Fullscreen, keeping the cmd running the whole time

Once Playnite Fullscreen closes :

  • It launches Playnite Desktop again
  • Then proceeds to restart the Nvidia streaming service, thus closing the moonlight connection then making the PC available again for streaming.

This requires :

  • To use moonlight or Nvidia Gamestreaming (I don't know how it'd fare with Steam Link, and as Steam Link launches Big Picture first, I'd assume it'd be a bit harder)
  • To add this script as a custom game in Nvidia Gamestreaming (I've put it under the label "Playnite" obviously)
  • To be admin of the Gamestreaming service (i.e. being able to stop and start it with the logged account); there's a detailed write-up on it on stackoverflow.

Again, it's quite dirty, but I didn't want to spend too much time on it, and it works, so there you go.

taskkill /IM Playnite.DesktopApp.exe /F
J:\Playnite\Playnite.FullscreenApp.exe
start /D J:\Playnite\ J:\Playnite\Playnite.DesktopApp.exe

:stop
sc stop NvContainerLocalSystem

rem cause a ~10 second sleep before checking the service state
ping 127.0.0.1 -n 10 -w 1000 > nul

sc query NvContainerLocalSystem | find /I "STATE" | find "STOPPED"
if errorlevel 1 goto :stop
goto :start

:start
net start | find /i "NVIDIA LocalSystem Container">nul && goto :start
sc start NvContainerLocalSystem


exit 0

I solved mine by writing a script that would auto-kill playnite when launching steam link, but had to rewrite my steam link firmware to do so. Would be way easier to have it as a command line param.

I've started working on implementing a "--switchpresentation" parameter in Playnite, which makes launched DesktopApp switch to full screen and vice versa.
I'll drop a PR once I'm sure it's working properly and it doesn't disrupt anything.

This is also my use case. No updates yet on this front?

Done in Playnite 8.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

xchaolingx picture xchaolingx  路  6Comments

MrMendelli picture MrMendelli  路  3Comments

ArtexJay picture ArtexJay  路  5Comments

SEGA99 picture SEGA99  路  4Comments

lapo-luchini picture lapo-luchini  路  4Comments