greenworks icon indicating copy to clipboard operation
greenworks copied to clipboard

Is there a way to check if we're initialized?

Open framerate opened this issue 4 years ago • 1 comments

I'm looking for a way to know if my game is running within Steam or without.

Currently, I do:

if (greenworks && greenworks.init())

But obviously this doesn't scale. Is there a way to do this that I missed? Something like greenworks.isInitialized()? Or perhaps greenworks.init() boolean result is safe to call multiple times?

Thanks!

framerate avatar Jun 25 '20 05:06 framerate

greenworks.isSteamRunning() is probably what you want? If that doesn't work for some reason, you could

if (greenworks && greenworks.init()) {
   running_in_steam=true
   ...
}

and then later check if (running_in_steam) throughout your code

pancelor avatar Jun 01 '21 00:06 pancelor