Add a special case to make steam launched games not control steam's sound, because after fixing the process matching to make it pick up the right name and icon consistently, it makes it weirder for steam to have its volume changed unexpectedly
This commit is contained in:
parent
13fdfde3e5
commit
609a7bdb65
@ -154,14 +154,15 @@ public class AudioHelper
|
|||||||
//Additionally, I group all audio processes that match instead of just the most specific, or the first, etc. Because Discord uses two processes, one for voice chat, and one for discord sounds.
|
//Additionally, I group all audio processes that match instead of just the most specific, or the first, etc. Because Discord uses two processes, one for voice chat, and one for discord sounds.
|
||||||
//
|
//
|
||||||
//Steam and Discord are both very common, and end up butting heads in the algorithm.
|
//Steam and Discord are both very common, and end up butting heads in the algorithm.
|
||||||
//And I'm not overly fond of programming in special cases
|
//I want to avoid special cases, but since steam and discord are both so common, i'm making an exception.
|
||||||
//so for the time being, the only down side i've found for including the parent process is that when you launch a game from steam and change the volume, you also change steam's volume. but that really only impacts videos on steam store pages
|
var parentProcess = ParentProcessUtilities.GetParentProcess(pid);
|
||||||
//The icon is also often steam's icon instead of the games'.
|
if (parentProcess != null
|
||||||
//But i'm striving for functional before perfection.
|
&& parentProcess.ProcessName != "explorer"
|
||||||
var blah = ParentProcessUtilities.GetParentProcess(pid);
|
&& parentProcess.ProcessName != "svchost"
|
||||||
if (blah != null && blah.ProcessName != "explorer" && blah.ProcessName != "svchost")
|
&& (parentProcess.ProcessName == "steam" && processes.Any(x => x.ProcessName == "steamwebhelper")) //only include steam if the parent process is the steamwebhelper
|
||||||
|
)
|
||||||
{
|
{
|
||||||
processes.Add(blah);
|
processes.Add(parentProcess);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
Loading…
Reference in New Issue
Block a user