Using Alt+Tab switches scenes

Parhelion

New Member
Hey there. Sorry if this is in the wrong spot but I've got a question about using OBS with the automatic scene switcher.

So recently I've been streaming League of Legends while using OBS. It works just fine except for 1 thing.
Whenever I'm in game and alt+tab to say like, change a song, OBS stops detecting my game.

My scene switcher is setup in a way that when my game.exe is running it shows my game, and when it isn't running it shows my client/launcher.
I'm running my game in windowed borderless so the game is always open on my first monitor. However when I try to alt tab to something on my second monitor such as my browser or Spotify it stops detecting my game and automatically switches to my launcher instead of keeping my game on stream.

Is it possible to fix this with some sort of plugin or is it just how OBS works?

Thanks!

EDIT: Extra info: I'm using Window Capture for my launcher and Game Capture for my game.
 

Parhelion

New Member
mmmmmt did you use game capture and you have setup the executable ?
Yeah. It's Game Captured and the program it's referring to is the actual game. But when I Alt+Tab, the game stays open on my screen but OBS doesn't detect it anymore and thus swapping back to the launcher.
 

Warmuptill

Active Member
Yeah. It's Game Captured and the program it's referring to is the actual game. But when I Alt+Tab, the game stays open on my screen but OBS doesn't detect it anymore and thus swapping back to the launcher.
When you are saying "OBS doesn't detect it anymore and thus swapping back to the launcher." you are referring to the automatic scene switcher, are you not?

In case you are talking about the built-in scene switcher, you might want to have a look at the advanced scene switcher plugin.
There you could define that the "Task Switching" window - that is the name of the ALT-TAB window - shall be ignored.
Or you could configure to also stay on your game capture scene if the window is open in general and not just when it is in focus.

Hope that helps! :)
 

Parhelion

New Member
ah moment do you speak about LOL ?
can look ho i make this !
Yeah I'm talking about league. I've set up a scene switch for going in-game.

When you are saying "OBS doesn't detect it anymore and thus swapping back to the launcher." you are referring to the automatic scene switcher, are you not?

In case you are talking about the built-in scene switcher, you might want to have a look at the advanced scene switcher plugin.
There you could define that the "Task Switching" window - that is the name of the ALT-TAB window - shall be ignored.
Or you could configure to also stay on your game capture scene if the window is open in general and not just when it is in focus.

Hope that helps! :)

Yes, I'm referring to the automatic scene switcher. I'll check out the advanced plugin than, seems like that's exactly what I need. Thanks!
 

koala

Active Member
The scene switcher works perfectly as designed. You're missing a small detail.

My scene switcher is setup in a way that when my game.exe is running it shows my game, and when it isn't running it shows my client/launcher.
The scene switcher isn't looking for "game.exe is running". The scene switcher is looking for "game.exe is the foreground app". The scene switcher is meant and designed to follow the foreground app. If you do ALT-Tab, you're switching some other app into the foreground, and the scene switcher is just following this.
The quoted sentence from you is actually this: "My scene switcher is setup in a way that when my game.exe is the foreground app, it shows my game, and when it isn't the foreground app, it shows my client/launcher."
 

-JL-

New Member
When you are saying "OBS doesn't detect it anymore and thus swapping back to the launcher." you are referring to the automatic scene switcher, are you not?

In case you are talking about the built-in scene switcher, you might want to have a look at the advanced scene switcher plugin.
There you could define that the "Task Switching" window - that is the name of the ALT-TAB window - shall be ignored.
Or you could configure to also stay on your game capture scene if the window is open in general and not just when it is in focus.

Hope that helps! :)
Hiya, I came across your post when trying to research this problem. How do you configure to stay on the game capture scene if the window is open in general? I don't see these options anywhere within the advanced scene switcher plugin, would appreciate it if you could point me in the right direction :)
 

koala

Active Member
You should be able to make the advanced scene switcher plugin work as outlined in the opening post, since it has additional options to select processes and window titles if they are just running, if they are running fullscreen, or if they are focused. In the default OBS scene switcher the focused option is hardcoded always active, in the advanced scene switcher you are able to configure this.
 

Warmuptill

Active Member
Hiya, I came across your post when trying to research this problem. How do you configure to stay on the game capture scene if the window is open in general? I don't see these options anywhere within the advanced scene switcher plugin, would appreciate it if you could point me in the right direction :)
You could either check if the process is running by using the Executable tab or just uncheck the "if focused" option of the entry on the window tab.
 

-JL-

New Member
I'm still having some issues even though I've unchecked the 'if focused' option. In summary, I have a scene for 'in-game' in League, and a scene for the client. What I want to do is automatically switch to the in-game scene whenever the game itself is launched, and switch back to the client when the game ends. However, I don't want to switch to the client if I'm simply alt-tabbing to it while in the middle of the game.

I have the game as one window and the client as another window, with their respective scenes linked correctly. I've unchecked 'if focused' for both, and placed the game scene 'above' the client scene, as shown below (as I assume this would give priority to always switch to the in-game scene if the game is running). Unfortunately, it will still switch to the client when I alt tab to it even if the game is open.

(Note: just in case you're unaware, the league game window is the one with 'Client' in the name lol)
Capture.PNG


Any ideas how I can achieve the behaviour I want? Or is this functionality simply impossible?
 

koala

Active Member
I have a scene for 'in-game' in League, and a scene for the client. What I want to do is automatically switch to the in-game scene whenever the game itself is launched, and switch back to the client when the game ends.
You don't need a scene switcher for this. In the sources list of your scene, just make sure the game client source is above the lobby source. Use the ^ and V buttons in the sources list to rearrange your sources, or drag the list entries with the mouse. This way, the lobby source is overlaid with the game client source, as long as the game client source has something to capture. If there is no game to capture, that source is invisible and the lobby source is visible from underneath.
 

Warmuptill

Active Member
I'm still having some issues even though I've unchecked the 'if focused' option. In summary, I have a scene for 'in-game' in League, and a scene for the client. What I want to do is automatically switch to the in-game scene whenever the game itself is launched, and switch back to the client when the game ends. However, I don't want to switch to the client if I'm simply alt-tabbing to it while in the middle of the game.

I have the game as one window and the client as another window, with their respective scenes linked correctly. I've unchecked 'if focused' for both, and placed the game scene 'above' the client scene, as shown below (as I assume this would give priority to always switch to the in-game scene if the game is running). Unfortunately, it will still switch to the client when I alt tab to it even if the game is open.

(Note: just in case you're unaware, the league game window is the one with 'Client' in the name lol)
View attachment 67831

Any ideas how I can achieve the behaviour I want? Or is this functionality simply impossible?
As mentioned by koala you might not even have to use a scene switcher for this.

While I am not sure what is exactly going on in your setup I would say that the settings for the advanced scene switcher look correct for what you are trying to achieve assuming the other tabs do not contain any conflicting settings.
(Also assuming LOL doesn't somehow change the window title when alt-tabbed, but that would be very strange)

Your assumption is correct that the settings are checked from top to bottom and thus entries further up in the list will have a higher priority.

Maybe you are running the built-in scene switcher and the advanced scene swither at the same time and that is causing the strange behaviour.
Can you make sure to only run one of them?

Alternatively you can maybe make use of the executable tab, which checks if a particular process is running independent of its window name.
 

-JL-

New Member
You don't need a scene switcher for this. In the sources list of your scene, just make sure the game client source is above the lobby source.
Thanks! I didn't think of this solution but turns out it was the simplest one.

Maybe you are running the built-in scene switcher and the advanced scene swither at the same time and that is causing the strange behaviour.
Can you make sure to only run one of them?

Alternatively you can maybe make use of the executable tab, which checks if a particular process is running independent of its window name.
Yep I made sure the built in switcher was turned off when I installed and started using the advanced one. Didn't matter, it seems like with Window scene switches, alt-tabbing to said window took priority regardless of whether 'in focus' was checked, or which order the scene/window pairings were in. Using executables instead of windows worked though!
 
Top