mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-05 22:36:05 +02:00
Stop audio device change event from occurring when opening big menu
This commit is contained in:
+9
-3
@@ -332,6 +332,7 @@ namespace VRCX
|
|||||||
});
|
});
|
||||||
|
|
||||||
logContext.onJoinPhotonDisplayName = String.Empty;
|
logContext.onJoinPhotonDisplayName = String.Empty;
|
||||||
|
logContext.LastAudioDevice = String.Empty;
|
||||||
logContext.LastVideoError = String.Empty;
|
logContext.LastVideoError = String.Empty;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -811,9 +812,15 @@ namespace VRCX
|
|||||||
lineOffset += 3;
|
lineOffset += 3;
|
||||||
var endPos = line.Length - 1;
|
var endPos = line.Length - 1;
|
||||||
var audioDevice = line.Substring(lineOffset, endPos - lineOffset);
|
var audioDevice = line.Substring(lineOffset, endPos - lineOffset);
|
||||||
|
if (String.IsNullOrEmpty(logContext.LastAudioDevice))
|
||||||
if (logContext.AudioDeviceChanged && audioDevice != logContext.LastAudioDevice)
|
|
||||||
{
|
{
|
||||||
|
logContext.AudioDeviceChanged = false;
|
||||||
|
logContext.LastAudioDevice = audioDevice;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (!logContext.AudioDeviceChanged || logContext.LastAudioDevice == audioDevice)
|
||||||
|
return true;
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
{
|
{
|
||||||
fileInfo.Name,
|
fileInfo.Name,
|
||||||
@@ -821,7 +828,6 @@ namespace VRCX
|
|||||||
"event",
|
"event",
|
||||||
$"Audio device changed, mic set to '{audioDevice}'"
|
$"Audio device changed, mic set to '{audioDevice}'"
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
logContext.LastAudioDevice = audioDevice;
|
logContext.LastAudioDevice = audioDevice;
|
||||||
logContext.AudioDeviceChanged = false;
|
logContext.AudioDeviceChanged = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user