Fix desktop/VR detection on VRC open beta

This commit is contained in:
Natsumi
2024-07-26 10:18:42 +12:00
parent 21181f0b55
commit 37bd128908
4 changed files with 14 additions and 44 deletions

View File

@@ -202,7 +202,6 @@ namespace VRCX
if (line.Length <= 36 ||
line[31] != '-')
{
ParseDesktopModeOld(fileInfo, line);
continue;
}
@@ -1028,9 +1027,11 @@ namespace VRCX
// 2023.04.22 16:52:28 Log - Initializing VRSDK.
// 2023.04.22 16:52:29 Log - StartVRSDK: Open VR Loader
// 2024.07.26 01:48:56 Log - STEAMVR HMD Model: Index
if (string.Compare(line, offset, "OpenVR initialized!", 0, 19, StringComparison.Ordinal) != 0 &&
string.Compare(line, offset, "Initializing VRSDK.", 0, 19, StringComparison.Ordinal) != 0)
if (string.Compare(line, offset, "Initializing VRSDK.", 0, 19, StringComparison.Ordinal) != 0 &&
string.Compare(line, offset, "STEAMVR HMD Model: ", 0, 20, StringComparison.Ordinal) != 0)
return false;
AppendLog(new[]
@@ -1060,23 +1061,6 @@ namespace VRCX
return true;
}
private bool ParseDesktopModeOld(FileInfo fileInfo, string line)
{
// XR Device: None
if (string.Compare(line, 0, " XR Device: None", 0, 19, StringComparison.Ordinal) != 0)
return false;
AppendLog(new[]
{
fileInfo.Name,
ConvertLogTimeToISO8601(line),
"desktop-mode"
});
return true;
}
private bool ParseLogStringDownload(FileInfo fileInfo, LogContext logContext, string line, int offset)
{
// 2023.03.23 11:37:21 Log - [String Download] Attempting to load String from URL 'https://pastebin.com/raw/BaW6NL2L'