BOLL7708 / OpenVRStartup

Run scripts on SteamVR startup and/or shutdown
GNU Affero General Public License v3.0
36 stars 5 forks source link

Add Shutdown Scripts #1

Closed piepie62 closed 3 years ago

piepie62 commented 3 years ago

Do note: this is my first time using the OpenVR API, so I'm not certain whether this is the best way to actually implement this. It does work, though.

BOLL7708 commented 3 years ago

It's basically what we have to do yeah, poll the even queue to look for the quit event. I'm a bit swamped with other projects, but I'll look at this hopefully within a week. The whole constant polling was the reason why I dismissed this feature in the first place, buuuut, I figure we could just look for shutdown scripts at startup, and if none exist just terminate and that's that. Thanks for doing this, again I'll get to it, soon.

piepie62 commented 3 years ago

That's a good point/optimization that I hadn't thought of. Just a note, I chose the event polling timeout to be a tenth of a second on a whim; it's possible that a full second could work as well, reducing overhead a bit with no huge cost.

LonleyViper commented 3 years ago

I love you guys! In terms of CPU hit. What are we talking?

LonleyViper commented 3 years ago

Dumb question - are you compiling this for release? No biggie I can do it from source if you're busy :)

BOLL7708 commented 3 years ago

@LonleyViper I have been working on it since merging it, there is now a new release with this built in. I reworked a bunch of the code to clean it up a bit, and from my initial testing it seems to do exactly what it is supposed to do. If you find any problems with it you know where to report them 😉