[Added] Option to not pause the game on losing focus

Moderator: GZDoom Developers

Option to not pause the game on losing focus

Postby 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.
Kzer-Za
 
Joined: 20 Aug 2017
Operating System: Other Linux 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Option to not pause the game on losing focus

Postby 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.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Option to not pause the game on losing focus

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

Oh, thanks, I didn't know that!
Kzer-Za
 
Joined: 20 Aug 2017
Operating System: Other Linux 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Option to not pause the game on losing focus

Postby 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.
User avatar
Lemon King
 
Joined: 15 Jul 2021

Re: Option to not pause the game on losing focus

Postby 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.
Kzer-Za
 
Joined: 20 Aug 2017
Operating System: Other Linux 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Option to not pause the game on losing focus

Postby Zara Dittinggold » Sat Jan 15, 2022 5:59 am

You should have them both:

i_soundinbackground 1
vid_activeinbackground 1
Zara Dittinggold
 

Re: Option to not pause the game on losing focus

Postby 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.
Kzer-Za
 
Joined: 20 Aug 2017
Operating System: Other Linux 64-bit
Graphics Processor: nVidia (Modern GZDoom)

Re: Option to not pause the game on losing focus

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

As I said, it's tied into the sound code.
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support

Re: Option to not pause the game on losing focus

Postby 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/commit/194d59f41819d6aee329b073dcbda322945d43d2 (commit was reversed due to issues)
User avatar
Rachael
^ walking stack of unfinished projects ^
Admin
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Graphics Processor: nVidia with Vulkan support


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 3 guests