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.
Option to not pause the game on losing focus
Moderator: GZDoom Developers
-
- Posts: 516
- Joined: Sat Aug 19, 2017 11:52 pm
- Graphics Processor: nVidia (Modern GZDoom)
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Option to not pause the game on losing focus
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.
Please don't ask me why it's tied to that.
It should be split, in my opinion, into its own separate variable.
-
- Posts: 516
- Joined: Sat Aug 19, 2017 11:52 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Option to not pause the game on losing focus
Oh, thanks, I didn't know that!
-
- Posts: 33
- Joined: Thu Jul 15, 2021 10:01 am
Re: Option to not pause the game on losing focus
Better variable to set would be to set "vid_activeinbackground" to 1 in console.
From:
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.
-
- Posts: 516
- Joined: Sat Aug 19, 2017 11:52 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Option to not pause the game on losing focus
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
You should have them both:
i_soundinbackground 1
vid_activeinbackground 1
i_soundinbackground 1
vid_activeinbackground 1
-
- Posts: 516
- Joined: Sat Aug 19, 2017 11:52 pm
- Graphics Processor: nVidia (Modern GZDoom)
Re: Option to not pause the game on losing focus
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.
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Option to not pause the game on losing focus
As I said, it's tied into the sound code.
-
- Posts: 13793
- Joined: Tue Jan 13, 2004 1:31 pm
- Preferred Pronouns: She/Her
Re: Option to not pause the game on losing focus
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)
https://github.com/coelckers/gzdoom/com ... 2d48f641fe
https://github.com/coelckers/Raze/commi ... 22945d43d2 (commit was reversed due to issues)
-
- Posts: 21
- Joined: Thu Sep 10, 2020 2:48 am
- Graphics Processor: Intel with Vulkan/Metal Support
Re: Option to not pause the game on losing focus
Add the following to the GlobalSettings of your gzdoom.ini:
Tested with GZDoom 4.9 nightly.
Code: Select all
vid_activeinbackground=false
i_pauseinbackground=true
i_soundinbackground=false