Keep an application from pausing when it loses focus

I’m trying to clean up a few collectibles in Yakuza 0. Unfortunately, the end-game is kind of like those “idle” games—do ~30 seconds of menu navigation, wait 5 minutes, repeat. So, I thought I would run the game in a window and tab into it every so often. In the meantime, I could do something else with my computer while the game runs in the background.

However, as soon as the game loses focus, it pauses. There’s no “run in background” option in the settings menu, and setting the window to be always-on-top with Special K didn’t make a difference. (Special K is a mod that lets you mess with the rendering API and stuff, I’m just using it to fix a few graphics issues.)

The simplest solution would be to “lie” to the application—tell it that it has focus, even when it’s in the background. But I can’t find a program to do that, and Windows doesn’t expose such fine-grained compositor tweaks.

Any suggestions? I’m running Win10 on bare metal, no VMs, wine, VFIO, etc.

Although not a suitable fix, this may be a hacky workaround using Steam itself to keep the game in an ‘active’ state.

I’d probably just use a laptop or another PC to use the Steam Streaming capability to stream that to the other device and keep that handy next to your main system. It’ll still use your main PCs hardware (so even it’s a piece of crap laptop like mine it should work - it’s just the input lag is abysmal) and should be listed as ‘active’ as far as I know.

Just to add to this it even works on smartphone and tablets.

Damn, that’s a great workaround…unfortunately, my game in particular doesn’t support Steam’s remote play feature. I tried to trick it into streaming it anyway by replacing a different, streamable game’s executable with a link to Yakuza 0, but no dice. I’ll remember this one for the future, though.

1 Like

That’s lame! There is another way I can think of which is not preferable…

Use a Windows Virtual Machine and have that running in background with Yakuza running in it… Although to be honest that’s starting to be more effort than the return haha

1 Like

I had the same thought, actually! Now I kind of wish I had gone the VFIO route…

Are you sure? It has been a while since I used it but it worked to stream just the desktop when I used it once, so full PC streaming, I was browsing chrome on another PC over streaming.

Maybe steam needs to be admin? I have that with my Steam Controller not likening non steam games.

Generally if you can get the steam overlay to work in a game all their other stuff should too.

I loaded up Steam to look into the full-desktop streaming Zibob mentioned, and…remote play is enabled for Yakuza 0. It was greyed-out yesterday, but 24 hours and zero changes to settings later, it…just works?

Thanks Valve, very cool!

1 Like

Steam remote play doesn’t seem to have any effect on window focus. If I tab over from the game to another window, that window gets streamed to the laptop instead—and the game goes into the background and pauses. And I was so close!

I guess Valve didn’t plan for the streaming host machine to be in use while also running the game for the client. I’ll take another pass through the Remote Play options, but there weren’t many and I didn’t see anything about being tied to one particular window.

Edit: Just took a look through the official Steam Remote Play community, it seems like this is just the way it works. One thread suggested using a VM and doing GPU passthrough…lol

1 Like