mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Small fixes
This commit is contained in:
@@ -26,11 +26,10 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
var isGameRunning = false;
|
var isGameRunning = false;
|
||||||
var isSteamVRRunning = false;
|
var isSteamVRRunning = false;
|
||||||
|
var isHmdAfk = false;
|
||||||
|
|
||||||
if (ProcessMonitor.Instance.IsProcessRunning("VRChat"))
|
if (ProcessMonitor.Instance.IsProcessRunning("VRChat"))
|
||||||
{
|
|
||||||
isGameRunning = true;
|
isGameRunning = true;
|
||||||
}
|
|
||||||
|
|
||||||
if (Wine.GetIfWine())
|
if (Wine.GetIfWine())
|
||||||
{
|
{
|
||||||
@@ -39,18 +38,15 @@ namespace VRCX
|
|||||||
{
|
{
|
||||||
var wineTmp = File.ReadAllText(wineTmpPath);
|
var wineTmp = File.ReadAllText(wineTmpPath);
|
||||||
if (wineTmp.Contains("isGameRunning=true"))
|
if (wineTmp.Contains("isGameRunning=true"))
|
||||||
{
|
|
||||||
isGameRunning = true;
|
isGameRunning = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ProcessMonitor.Instance.IsProcessRunning("vrserver"))
|
if (ProcessMonitor.Instance.IsProcessRunning("vrserver"))
|
||||||
{
|
|
||||||
isSteamVRRunning = true;
|
isSteamVRRunning = true;
|
||||||
}
|
|
||||||
|
|
||||||
var isHmdAfk = Program.VRCXVRInstance.IsHmdAfk;
|
if (Program.VRCXVRInstance != null)
|
||||||
|
isHmdAfk = Program.VRCXVRInstance.IsHmdAfk;
|
||||||
|
|
||||||
// TODO: fix this throwing an exception for being called before the browser is ready. somehow it gets past the checks
|
// TODO: fix this throwing an exception for being called before the browser is ready. somehow it gets past the checks
|
||||||
if (MainForm.Instance?.Browser != null && !MainForm.Instance.Browser.IsLoading && MainForm.Instance.Browser.CanExecuteJavascriptInMainFrame)
|
if (MainForm.Instance?.Browser != null && !MainForm.Instance.Browser.IsLoading && MainForm.Instance.Browser.CanExecuteJavascriptInMainFrame)
|
||||||
|
|||||||
+128
-119
@@ -172,116 +172,114 @@ namespace VRCX
|
|||||||
/// <param name="logContext">The log context to update.</param>
|
/// <param name="logContext">The log context to update.</param>
|
||||||
private void ParseLog(FileInfo fileInfo, LogContext logContext)
|
private void ParseLog(FileInfo fileInfo, LogContext logContext)
|
||||||
{
|
{
|
||||||
|
var line = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (var stream = new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 65536, FileOptions.SequentialScan))
|
using var stream = new FileStream(fileInfo.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite, 65536, FileOptions.SequentialScan);
|
||||||
|
stream.Position = logContext.Position;
|
||||||
|
using var streamReader = new StreamReader(stream, Encoding.UTF8);
|
||||||
|
while (true)
|
||||||
{
|
{
|
||||||
stream.Position = logContext.Position;
|
line = streamReader.ReadLine();
|
||||||
using (var streamReader = new StreamReader(stream, Encoding.UTF8))
|
if (line == null)
|
||||||
{
|
{
|
||||||
while (true)
|
logContext.Position = stream.Position;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (line.Length == 0)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2020.10.31 23:36:28 Log - [VRCFlowManagerVRC] Destination fetching: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd
|
||||||
|
// 2021.02.03 10:18:58 Log - [DŽDŽDžDžDžDŽDŽDžDžDŽDžDžDžDžDŽDŽDŽDžDžDŽDŽDžDžDžDžDŽDžDžDžDžDŽDŽDŽDŽDŽDžDŽDžDŽDŽDŽDžDžDŽDžDžDž] Destination fetching: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd
|
||||||
|
|
||||||
|
if (ParseLogUdonException(fileInfo, line))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if (line.Length <= 36 ||
|
||||||
|
line[31] != '-')
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DateTime.TryParseExact(
|
||||||
|
line.Substring(0, 19),
|
||||||
|
"yyyy.MM.dd HH:mm:ss",
|
||||||
|
CultureInfo.InvariantCulture,
|
||||||
|
DateTimeStyles.None,
|
||||||
|
out var lineDate
|
||||||
|
))
|
||||||
|
{
|
||||||
|
lineDate = lineDate.ToUniversalTime();
|
||||||
|
// check if date is older than last database entry
|
||||||
|
if (DateTime.Compare(lineDate, tillDate) <= 0)
|
||||||
{
|
{
|
||||||
var line = streamReader.ReadLine();
|
// logger.Warn("Invalid log time, too old: {0}", line);
|
||||||
if (line == null)
|
continue;
|
||||||
{
|
}
|
||||||
logContext.Position = stream.Position;
|
// check if datetime is over an hour into the future (compensate for gamelog not handling daylight savings time correctly)
|
||||||
break;
|
if (DateTime.UtcNow.AddMinutes(61) < lineDate)
|
||||||
}
|
{
|
||||||
|
logger.Warn("Invalid log time, too new: {0}", line);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
logger.Warn("Failed to parse log date: {0}", line);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (line.Length == 0)
|
var offset = 34;
|
||||||
{
|
if (line[offset] == '[')
|
||||||
continue;
|
{
|
||||||
}
|
if (ParseLogOnPlayerJoinedOrLeft(fileInfo, logContext, line, offset) ||
|
||||||
|
ParseLogLocation(fileInfo, logContext, line, offset) ||
|
||||||
// 2020.10.31 23:36:28 Log - [VRCFlowManagerVRC] Destination fetching: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd
|
ParseLogLocationDestination(fileInfo, logContext, line, offset) ||
|
||||||
// 2021.02.03 10:18:58 Log - [DŽDŽDžDžDžDŽDŽDžDžDŽDžDžDžDžDŽDŽDŽDžDžDŽDŽDžDžDžDžDŽDžDžDžDžDŽDŽDŽDŽDŽDžDŽDžDŽDŽDŽDžDžDŽDžDžDž] Destination fetching: wrld_4432ea9b-729c-46e3-8eaf-846aa0a37fdd
|
ParseLogPortalSpawn(fileInfo, logContext, line, offset) ||
|
||||||
|
ParseLogNotification(fileInfo, logContext, line, offset) ||
|
||||||
if (ParseLogUdonException(fileInfo, line))
|
ParseLogAPIRequest(fileInfo, logContext, line, offset) ||
|
||||||
continue;
|
ParseLogAvatarChange(fileInfo, logContext, line, offset) ||
|
||||||
|
ParseLogJoinBlocked(fileInfo, logContext, line, offset) ||
|
||||||
if (line.Length <= 36 ||
|
ParseLogAvatarPedestalChange(fileInfo, logContext, line, offset) ||
|
||||||
line[31] != '-')
|
ParseLogVideoError(fileInfo, logContext, line, offset) ||
|
||||||
{
|
ParseLogVideoChange(fileInfo, logContext, line, offset) ||
|
||||||
continue;
|
ParseLogAVProVideoChange(fileInfo, logContext, line, offset) ||
|
||||||
}
|
ParseLogUsharpVideoPlay(fileInfo, logContext, line, offset) ||
|
||||||
|
ParseLogUsharpVideoSync(fileInfo, logContext, line, offset) ||
|
||||||
if (DateTime.TryParseExact(
|
ParseLogWorldVRCX(fileInfo, logContext, line, offset) ||
|
||||||
line.Substring(0, 19),
|
ParseLogWorldDataVRCX(fileInfo, logContext, line, offset) ||
|
||||||
"yyyy.MM.dd HH:mm:ss",
|
ParseLogOnAudioConfigurationChanged(fileInfo, logContext, line, offset) ||
|
||||||
CultureInfo.InvariantCulture,
|
ParseLogScreenshot(fileInfo, logContext, line, offset) ||
|
||||||
DateTimeStyles.None,
|
ParseLogStringDownload(fileInfo, logContext, line, offset) ||
|
||||||
out var lineDate
|
ParseLogImageDownload(fileInfo, logContext, line, offset) ||
|
||||||
))
|
ParseVoteKick(fileInfo, logContext, line, offset) ||
|
||||||
{
|
ParseFailedToJoin(fileInfo, logContext, line, offset) ||
|
||||||
lineDate = lineDate.ToUniversalTime();
|
ParseInstanceResetWarning(fileInfo, logContext, line, offset) ||
|
||||||
// check if date is older than last database entry
|
ParseVoteKickInitiation(fileInfo, logContext, line, offset) ||
|
||||||
if (DateTime.Compare(lineDate, tillDate) <= 0)
|
ParseVoteKickSuccess(fileInfo, logContext, line, offset) ||
|
||||||
{
|
ParseStickerSpawn(fileInfo, logContext, line, offset))
|
||||||
continue;
|
{
|
||||||
}
|
}
|
||||||
// check if datetime is over an hour into the future (compensate for gamelog not handling daylight savings time correctly)
|
}
|
||||||
if (DateTime.UtcNow.AddMinutes(61) < lineDate)
|
else
|
||||||
{
|
{
|
||||||
logger.Warn("Invalid log time, too new: {0}", line);
|
if (ParseLogShaderKeywordsLimit(fileInfo, logContext, line, offset) ||
|
||||||
continue;
|
ParseLogSDK2VideoPlay(fileInfo, logContext, line, offset) ||
|
||||||
}
|
ParseApplicationQuit(fileInfo, logContext, line, offset) ||
|
||||||
}
|
ParseOpenVRInit(fileInfo, logContext, line, offset) ||
|
||||||
else
|
ParseDesktopMode(fileInfo, logContext, line, offset) ||
|
||||||
{
|
ParseOscFailedToStart(fileInfo, logContext, line, offset))
|
||||||
logger.Warn("Failed to parse log date: {0}", line);
|
{
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
var offset = 34;
|
|
||||||
if (line[offset] == '[')
|
|
||||||
{
|
|
||||||
if (ParseLogOnPlayerJoinedOrLeft(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogLocation(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogLocationDestination(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogPortalSpawn(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogNotification(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogAPIRequest(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogAvatarChange(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogJoinBlocked(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogAvatarPedestalChange(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogVideoError(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogVideoChange(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogAVProVideoChange(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogUsharpVideoPlay(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogUsharpVideoSync(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogWorldVRCX(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogWorldDataVRCX(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogOnAudioConfigurationChanged(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogScreenshot(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogStringDownload(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogImageDownload(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseVoteKick(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseFailedToJoin(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseInstanceResetWarning(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseVoteKickInitiation(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseVoteKickSuccess(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseStickerSpawn(fileInfo, logContext, line, offset))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (ParseLogShaderKeywordsLimit(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseLogSDK2VideoPlay(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseApplicationQuit(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseOpenVRInit(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseDesktopMode(fileInfo, logContext, line, offset) ||
|
|
||||||
ParseOscFailedToStart(fileInfo, logContext, line, offset))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
logger.Warn("Failed to parse log file: {0} {1}", fileInfo.FullName, ex.Message);
|
logger.Warn(ex, "Failed to parse log file: {0} {1} {2}", fileInfo.FullName, line, ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +339,7 @@ namespace VRCX
|
|||||||
|
|
||||||
if (line.Contains("[Behaviour] Entering Room: "))
|
if (line.Contains("[Behaviour] Entering Room: "))
|
||||||
{
|
{
|
||||||
var lineOffset = line.LastIndexOf("] Entering Room: ");
|
var lineOffset = line.LastIndexOf("] Entering Room: ", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
lineOffset += 17;
|
lineOffset += 17;
|
||||||
@@ -355,7 +353,7 @@ namespace VRCX
|
|||||||
|
|
||||||
if (line.Contains("[Behaviour] Joining ") && !line.Contains("] Joining or Creating Room: ") && !line.Contains("] Joining friend: "))
|
if (line.Contains("[Behaviour] Joining ") && !line.Contains("] Joining or Creating Room: ") && !line.Contains("] Joining friend: "))
|
||||||
{
|
{
|
||||||
var lineOffset = line.LastIndexOf("] Joining ");
|
var lineOffset = line.LastIndexOf("] Joining ", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
lineOffset += 10;
|
lineOffset += 10;
|
||||||
@@ -393,12 +391,18 @@ namespace VRCX
|
|||||||
if (!line.Contains("[VRC Camera] Took screenshot to: "))
|
if (!line.Contains("[VRC Camera] Took screenshot to: "))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var lineOffset = line.LastIndexOf("] Took screenshot to: ");
|
var lineOffset = line.LastIndexOf("] Took screenshot to: ", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
var screenshotPath = line.Substring(lineOffset + 22);
|
var screenshotPath = line.Substring(lineOffset + 22);
|
||||||
AppendLog(new[] { fileInfo.Name, ConvertLogTimeToISO8601(line), "screenshot", screenshotPath });
|
AppendLog(new[]
|
||||||
|
{
|
||||||
|
fileInfo.Name,
|
||||||
|
ConvertLogTimeToISO8601(line),
|
||||||
|
"screenshot",
|
||||||
|
screenshotPath
|
||||||
|
});
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -426,7 +430,7 @@ namespace VRCX
|
|||||||
|
|
||||||
if (line.Contains("[Behaviour] Destination fetching: "))
|
if (line.Contains("[Behaviour] Destination fetching: "))
|
||||||
{
|
{
|
||||||
var lineOffset = line.LastIndexOf("] Destination fetching: ");
|
var lineOffset = line.LastIndexOf("] Destination fetching: ", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
lineOffset += 24;
|
lineOffset += 24;
|
||||||
@@ -485,7 +489,7 @@ namespace VRCX
|
|||||||
|
|
||||||
if (line.Contains("[Behaviour] OnPlayerLeft") && !line.Contains("] OnPlayerLeftRoom") && !line.Contains("] OnPlayerLeft:"))
|
if (line.Contains("[Behaviour] OnPlayerLeft") && !line.Contains("] OnPlayerLeftRoom") && !line.Contains("] OnPlayerLeft:"))
|
||||||
{
|
{
|
||||||
var lineOffset = line.LastIndexOf("] OnPlayerLeft");
|
var lineOffset = line.LastIndexOf("] OnPlayerLeft", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
lineOffset += 15;
|
lineOffset += 15;
|
||||||
@@ -680,7 +684,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[Video Playback] Attempting to resolve URL '", 0, 44, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[Video Playback] Attempting to resolve URL '", 0, 44, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf("'");
|
var pos = line.LastIndexOf('\'');
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -705,7 +709,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[Video Playback] Resolving URL '", 0, 32, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[Video Playback] Resolving URL '", 0, 32, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf("'");
|
var pos = line.LastIndexOf('\'');
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -730,7 +734,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "User ", 0, 5, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "User ", 0, 5, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf(" added URL ");
|
var pos = line.LastIndexOf(" added URL ", StringComparison.Ordinal);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -756,7 +760,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[USharpVideo] Started video load for URL: ", 0, 42, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[USharpVideo] Started video load for URL: ", 0, 42, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf(", requested by ");
|
var pos = line.LastIndexOf(", requested by ", StringComparison.Ordinal);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -802,7 +806,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[API] Received Notification: <", 0, 30, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[API] Received Notification: <", 0, 30, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf("> received at ");
|
var pos = line.LastIndexOf("> received at ", StringComparison.Ordinal);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -827,7 +831,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[API] [", 0, 7, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[API] [", 0, 7, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf("] Sending Get request to ");
|
var pos = line.LastIndexOf("] Sending Get request to ", StringComparison.Ordinal);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -851,7 +855,7 @@ namespace VRCX
|
|||||||
if (string.Compare(line, offset, "[Behaviour] Switching ", 0, 22, StringComparison.Ordinal) != 0)
|
if (string.Compare(line, offset, "[Behaviour] Switching ", 0, 22, StringComparison.Ordinal) != 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var pos = line.LastIndexOf(" to avatar ");
|
var pos = line.LastIndexOf(" to avatar ", StringComparison.Ordinal);
|
||||||
if (pos < 0)
|
if (pos < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -972,6 +976,7 @@ namespace VRCX
|
|||||||
// 2022.03.15 03:40:34 Log - [Always] uSpeak: SetInputDevice 0 (3 total) 'Index HMD Mic (Valve VR Radio & HMD Mic)'
|
// 2022.03.15 03:40:34 Log - [Always] uSpeak: SetInputDevice 0 (3 total) 'Index HMD Mic (Valve VR Radio & HMD Mic)'
|
||||||
// 2022.03.15 04:02:22 Log - [Always] uSpeak: OnAudioConfigurationChanged - devicesChanged = True, resetting mic..
|
// 2022.03.15 04:02:22 Log - [Always] uSpeak: OnAudioConfigurationChanged - devicesChanged = True, resetting mic..
|
||||||
// 2022.03.15 04:02:22 Log - [Always] uSpeak: SetInputDevice by name 'Index HMD Mic (Valve VR Radio & HMD Mic)' (3 total)
|
// 2022.03.15 04:02:22 Log - [Always] uSpeak: SetInputDevice by name 'Index HMD Mic (Valve VR Radio & HMD Mic)' (3 total)
|
||||||
|
// 2025.01.03 19:11:42 Log - [Always] uSpeak: SetInputDevice 0 (2 total) 'Microphone (NVIDIA Broadcast)'
|
||||||
|
|
||||||
if (line.Contains("[Always] uSpeak: OnAudioConfigurationChanged"))
|
if (line.Contains("[Always] uSpeak: OnAudioConfigurationChanged"))
|
||||||
{
|
{
|
||||||
@@ -981,12 +986,16 @@ namespace VRCX
|
|||||||
|
|
||||||
if (line.Contains("[Always] uSpeak: SetInputDevice 0"))
|
if (line.Contains("[Always] uSpeak: SetInputDevice 0"))
|
||||||
{
|
{
|
||||||
var lineOffset = line.LastIndexOf(") '");
|
var lineOffset = line.LastIndexOf(") '", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
lineOffset += 3;
|
lineOffset += 3;
|
||||||
var endPos = line.Length - 1;
|
var endPos = line.Length - 1;
|
||||||
var audioDevice = line.Substring(lineOffset, endPos - lineOffset);
|
var length = Math.Min(endPos - lineOffset + 1, line.Length - lineOffset);
|
||||||
|
if (length <= 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
var audioDevice = line.Substring(lineOffset, length);
|
||||||
if (string.IsNullOrEmpty(logContext.LastAudioDevice))
|
if (string.IsNullOrEmpty(logContext.LastAudioDevice))
|
||||||
{
|
{
|
||||||
logContext.AudioDeviceChanged = false;
|
logContext.AudioDeviceChanged = false;
|
||||||
@@ -1031,7 +1040,7 @@ namespace VRCX
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
var lineOffset = line.IndexOf(" ---> VRC.Udon.VM.UdonVMException: ");
|
var lineOffset = line.IndexOf(" ---> VRC.Udon.VM.UdonVMException: ", StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1115,7 +1124,7 @@ namespace VRCX
|
|||||||
if (!line.Contains(check))
|
if (!line.Contains(check))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var lineOffset = line.LastIndexOf(check);
|
var lineOffset = line.LastIndexOf(check, StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -1142,7 +1151,7 @@ namespace VRCX
|
|||||||
if (!line.Contains(check))
|
if (!line.Contains(check))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var lineOffset = line.LastIndexOf(check);
|
var lineOffset = line.LastIndexOf(check, StringComparison.Ordinal);
|
||||||
if (lineOffset < 0)
|
if (lineOffset < 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@@ -1220,7 +1229,7 @@ namespace VRCX
|
|||||||
if (!line.Contains("[ModerationManager] This instance will be reset in "))
|
if (!line.Contains("[ModerationManager] This instance will be reset in "))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
int index = line.IndexOf("[ModerationManager] This instance will be reset in ") + 20;
|
int index = line.IndexOf("[ModerationManager] This instance will be reset in ", StringComparison.Ordinal) + 20;
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
{
|
{
|
||||||
@@ -1273,7 +1282,7 @@ namespace VRCX
|
|||||||
|
|
||||||
private bool ParseStickerSpawn(FileInfo fileInfo, LogContext logContext, string line, int offset)
|
private bool ParseStickerSpawn(FileInfo fileInfo, LogContext logContext, string line, int offset)
|
||||||
{
|
{
|
||||||
var index = line.IndexOf("[StickersManager] User ");
|
var index = line.IndexOf("[StickersManager] User ", StringComparison.Ordinal);
|
||||||
if (index == -1 || !line.Contains("file_") || !line.Contains("spawned sticker"))
|
if (index == -1 || !line.Contains("file_") || !line.Contains("spawned sticker"))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -1281,7 +1290,7 @@ namespace VRCX
|
|||||||
|
|
||||||
var (userId, displayName) = ParseUserInfo(info);
|
var (userId, displayName) = ParseUserInfo(info);
|
||||||
|
|
||||||
var fileIdIndex = info.IndexOf("file_");
|
var fileIdIndex = info.IndexOf("file_", StringComparison.Ordinal);
|
||||||
string fileId = info.Substring(fileIdIndex);
|
string fileId = info.Substring(fileIdIndex);
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
|
|||||||
+1
-1
@@ -135,7 +135,7 @@ namespace VRCX
|
|||||||
if (startIndex >= 0)
|
if (startIndex >= 0)
|
||||||
{
|
{
|
||||||
startIndex += "filename=".Length;
|
startIndex += "filename=".Length;
|
||||||
int endIndex = contentDisposition.IndexOf(";", startIndex);
|
int endIndex = contentDisposition.IndexOf(';', startIndex);
|
||||||
if (endIndex == -1)
|
if (endIndex == -1)
|
||||||
{
|
{
|
||||||
endIndex = contentDisposition.Length;
|
endIndex = contentDisposition.Length;
|
||||||
|
|||||||
+34
-2
@@ -611,6 +611,15 @@ speechSynthesis.getVoices();
|
|||||||
$app.updateSharedFeed(false);
|
$app.updateSharedFeed(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (ref.isFriend || ref.id === this.currentUser.id) {
|
||||||
|
// update instancePlayerCount
|
||||||
|
var newCount = $app.instancePlayerCount.get(ref.location);
|
||||||
|
if (typeof newCount === 'undefined') {
|
||||||
|
newCount = 0;
|
||||||
|
}
|
||||||
|
newCount++;
|
||||||
|
$app.instancePlayerCount.set(ref.location, newCount);
|
||||||
|
}
|
||||||
if ($app.customUserTags.has(json.id)) {
|
if ($app.customUserTags.has(json.id)) {
|
||||||
var tag = $app.customUserTags.get(json.id);
|
var tag = $app.customUserTags.get(json.id);
|
||||||
ref.$customTag = tag.tag;
|
ref.$customTag = tag.tag;
|
||||||
@@ -5550,6 +5559,7 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$app.data.instancePlayerCount = new Map();
|
||||||
$app.data.robotUrl = `${API.endpointDomain}/file/file_0e8c4e32-7444-44ea-ade4-313c010d4bae/1/file`;
|
$app.data.robotUrl = `${API.endpointDomain}/file/file_0e8c4e32-7444-44ea-ade4-313c010d4bae/1/file`;
|
||||||
|
|
||||||
API.$on('USER:UPDATE', async function (args) {
|
API.$on('USER:UPDATE', async function (args) {
|
||||||
@@ -5558,6 +5568,26 @@ speechSynthesis.getVoices();
|
|||||||
if (typeof friend === 'undefined') {
|
if (typeof friend === 'undefined') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (props.location) {
|
||||||
|
// update instancePlayerCount
|
||||||
|
var previousLocation = props.location[1];
|
||||||
|
var newLocation = props.location[0];
|
||||||
|
var oldCount = $app.instancePlayerCount.get(previousLocation);
|
||||||
|
if (typeof oldCount !== 'undefined') {
|
||||||
|
oldCount--;
|
||||||
|
if (oldCount <= 0) {
|
||||||
|
$app.instancePlayerCount.delete(previousLocation);
|
||||||
|
} else {
|
||||||
|
$app.instancePlayerCount.set(previousLocation, oldCount);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var newCount = $app.instancePlayerCount.get(newLocation);
|
||||||
|
if (typeof newCount === 'undefined') {
|
||||||
|
newCount = 0;
|
||||||
|
}
|
||||||
|
newCount++;
|
||||||
|
$app.instancePlayerCount.set(newLocation, newCount);
|
||||||
|
}
|
||||||
if (props.location && ref.id === $app.userDialog.id) {
|
if (props.location && ref.id === $app.userDialog.id) {
|
||||||
// update user dialog instance occupants
|
// update user dialog instance occupants
|
||||||
$app.applyUserDialogLocation(true);
|
$app.applyUserDialogLocation(true);
|
||||||
@@ -9373,11 +9403,13 @@ speechSynthesis.getVoices();
|
|||||||
speechSynthesis.speak(tts);
|
speechSynthesis.speak(tts);
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.refreshConfigTreeData = function () {
|
$app.methods.refreshConfigTreeData = async function () {
|
||||||
|
await API.getConfig();
|
||||||
this.configTreeData = $utils.buildTreeData(API.cachedConfig);
|
this.configTreeData = $utils.buildTreeData(API.cachedConfig);
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.refreshCurrentUserTreeData = function () {
|
$app.methods.refreshCurrentUserTreeData = async function () {
|
||||||
|
await API.getCurrentUser();
|
||||||
this.currentUserTreeData = $utils.buildTreeData(API.currentUser);
|
this.currentUserTreeData = $utils.buildTreeData(API.currentUser);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,8 @@ mixin friendsListTab()
|
|||||||
el-button(type="text" size="mini" @click.stop)
|
el-button(type="text" size="mini" @click.stop)
|
||||||
el-checkbox(v-model="scope.row.$selected" @change="friendsListBulkUnfriendForceUpdate++")
|
el-checkbox(v-model="scope.row.$selected" @change="friendsListBulkUnfriendForceUpdate++")
|
||||||
el-table-column(:label="$t('table.friendList.no')" width="70" prop="$friendNumber" sortable="custom")
|
el-table-column(:label="$t('table.friendList.no')" width="70" prop="$friendNumber" sortable="custom")
|
||||||
|
template(v-once #default="scope")
|
||||||
|
span {{ scope.row.$friendNumber ? scope.row.$friendNumber : '' }}
|
||||||
el-table-column(:label="$t('table.friendList.avatar')" width="70" prop="photo")
|
el-table-column(:label="$t('table.friendList.avatar')" width="70" prop="photo")
|
||||||
template(v-once #default="scope")
|
template(v-once #default="scope")
|
||||||
el-popover(placement="right" height="500px" trigger="hover")
|
el-popover(placement="right" height="500px" trigger="hover")
|
||||||
|
|||||||
Reference in New Issue
Block a user