Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a game from Vortex #1221

Closed
VortexFeedback opened this issue Oct 10, 2018 · 5 comments
Closed

Starting a game from Vortex #1221

VortexFeedback opened this issue Oct 10, 2018 · 5 comments
Labels
improvement 📈 An issue that improves an existing feature
Milestone

Comments

@VortexFeedback
Copy link
Collaborator

The play button which fire up the game isn't showing if I actually started it or not. If you press the play button multiple times, Vortex will open multiply windows with the game.

Reported by: SlowbroRed

@TanninOne
Copy link
Contributor

There is actually little we can do about that, even if we went through the trouble of monitoring the spawned process: if it's skse or similar, the process Vortex spawns finishes almost immediately, a good while before the game actually starts to show anything.

The best I can offer is to disable the button for a few seconds after it was clicked so you have some feedback that it was clicked - but then the button becoming enabled after that time could be misinterpreted as "oh, the game failed to start".

@TanninOne TanninOne added the improvement 📈 An issue that improves an existing feature label Oct 10, 2018
@chill0r
Copy link

chill0r commented Oct 11, 2018

@TanninOne How about waiting for the main game binary instead of lets say skse? Even if you use some tools like skse the main binary itself will (or should) start.

@TanninOne
Copy link
Contributor

That's not practical either, it would require us to monitor the entire process list waiting for the game binary to show up - which it may never do if - say skse fails - so then Vortex blocks forever. Unless we build in a timeout, which then may be to short.
And then there may be cases where the game runs as admin, in which case it won't show up in the process list Vortex can see.
And the binary we know as the one we're supposed to start may itself just be a launcher, in which case Vortex currently doesn't even know what binary will appear in the process list.

This gets super complicated and error prone.

@TanninOne
Copy link
Contributor

#2165 contains another interesting proposal how feedback can be given.

As I said above it's impractical to show, inside vortex, that the game is running but we can give feedback that vortex tried to start it (with unknown outcome) like #2165 suggests.

@TanninOne
Copy link
Contributor

I have solved this after all, by polling the process list and matching it against the configured tools/game exe.
Polling happens only at a rate of two seconds so after clicking the launcher the start button should be disabled for at least that long, if the game itself is also configured (which should always be the case) the button will remain disabled as long as the game is running.

It's a bit of an awkward solution since polling the process list isn't exactly cheap (~1% CPU load on my 4-core cpu) so it gets disabled while Vortex not the foreground application so that while you're playing the game, Vortex won't be using up that CPU time, but this also means that the button will not update while you're using any other application, you have to click back into Vortex and may have to wait for a few seconds for it to notice it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement 📈 An issue that improves an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants