Option to not pause the game on losing focus

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: Option to not pause the game on losing focus

Re: Option to not pause the game on losing focus

by i2van » Sat Jun 18, 2022 8:30 am

Add the following to the GlobalSettings of your gzdoom.ini:

Code: Select all

vid_activeinbackground=false
i_pauseinbackground=true
i_soundinbackground=false
Tested with GZDoom 4.9 nightly.

Re: Option to not pause the game on losing focus

by Rachael » Sat Jan 15, 2022 7:22 pm

Separated i_pauseinbackground and i_soundinbackground so that they are not tied together. Did it in Raze, too.

https://github.com/coelckers/gzdoom/com ... 2d48f641fe
https://github.com/coelckers/Raze/commi ... 22945d43d2 (commit was reversed due to issues)

Re: Option to not pause the game on losing focus

by Rachael » Sat Jan 15, 2022 10:10 am

As I said, it's tied into the sound code.

Re: Option to not pause the game on losing focus

by Kzer-Za » Sat Jan 15, 2022 8:38 am

Ah, that's what it is. Then probably vid_activeinbackground is true by default? Because after the first answer here I just switched i_soundinbackground and that was enough. Then for testing the effect of vid_activeinbackground I switched i_soundinbackground back to off.

Re: Option to not pause the game on losing focus

by Guest » Sat Jan 15, 2022 5:59 am

You should have them both:

i_soundinbackground 1
vid_activeinbackground 1

Re: Option to not pause the game on losing focus

by Kzer-Za » Sat Jan 15, 2022 3:35 am

Just tried "vid_activeinbackground 1", but it seems to have no effect. When I switch away, the game is paused. Tested in windowed mode, of course.

Re: Option to not pause the game on losing focus

by Lemon King » Fri Jan 14, 2022 11:18 pm

Better variable to set would be to set "vid_activeinbackground" to 1 in console.

From:
Graf Zahl wrote:This already exists. Set 'vid_activeinbackground' to 1 in the console and it should do what you want. For technical reasons this only works in windowed mode, not in fullscreen.

Re: Option to not pause the game on losing focus

by Kzer-Za » Thu Jan 13, 2022 6:46 am

Oh, thanks, I didn't know that!

Re: Option to not pause the game on losing focus

by Rachael » Thu Jan 13, 2022 6:06 am

Technically this is already doable as long as i_soundinbackground is enabled.

Please don't ask me why it's tied to that.

It should be split, in my opinion, into its own separate variable.

Option to not pause the game on losing focus

by Kzer-Za » Wed Jan 12, 2022 11:51 pm

When the window with the game loses focus (e.g. you Alt-Tab somewhere), the game is automatically paused. Can an option be added please to disable this behavior? I think many people would have a situation when they need the game for some reason or the other to keep running while they are switched away.

Personally, I need to test some effect that takes a long time and don't want to waste this time, so I'd rather switch to some other window and do something else while I'm waiting.

Top