mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Fix desktop/VR detection on VRC open beta
This commit is contained in:
+4
-20
@@ -202,7 +202,6 @@ namespace VRCX
|
|||||||
if (line.Length <= 36 ||
|
if (line.Length <= 36 ||
|
||||||
line[31] != '-')
|
line[31] != '-')
|
||||||
{
|
{
|
||||||
ParseDesktopModeOld(fileInfo, line);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1029,8 +1028,10 @@ namespace VRCX
|
|||||||
// 2023.04.22 16:52:28 Log - Initializing VRSDK.
|
// 2023.04.22 16:52:28 Log - Initializing VRSDK.
|
||||||
// 2023.04.22 16:52:29 Log - StartVRSDK: Open VR Loader
|
// 2023.04.22 16:52:29 Log - StartVRSDK: Open VR Loader
|
||||||
|
|
||||||
if (string.Compare(line, offset, "OpenVR initialized!", 0, 19, StringComparison.Ordinal) != 0 &&
|
// 2024.07.26 01:48:56 Log - STEAMVR HMD Model: Index
|
||||||
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;
|
return false;
|
||||||
|
|
||||||
AppendLog(new[]
|
AppendLog(new[]
|
||||||
@@ -1060,23 +1061,6 @@ namespace VRCX
|
|||||||
return true;
|
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)
|
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'
|
// 2023.03.23 11:37:21 Log - [String Download] Attempting to load String from URL 'https://pastebin.com/raw/BaW6NL2L'
|
||||||
|
|||||||
+6
-2
@@ -28309,7 +28309,9 @@ speechSynthesis.getVoices();
|
|||||||
}
|
}
|
||||||
if (!avatarInFavorites) {
|
if (!avatarInFavorites) {
|
||||||
removeFromArray(this.localAvatarFavoritesList, avatarId);
|
removeFromArray(this.localAvatarFavoritesList, avatarId);
|
||||||
database.removeAvatarFromCache(avatarId);
|
if (!this.avatarHistory.has(avatarId)) {
|
||||||
|
database.removeAvatarFromCache(avatarId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
database.removeAvatarFromFavorites(avatarId, group);
|
database.removeAvatarFromFavorites(avatarId, group);
|
||||||
if (
|
if (
|
||||||
@@ -28544,7 +28546,9 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
avatarIdRemoveList.forEach((id) => {
|
avatarIdRemoveList.forEach((id) => {
|
||||||
removeFromArray(this.localAvatarFavoritesList, id);
|
removeFromArray(this.localAvatarFavoritesList, id);
|
||||||
database.removeAvatarFromCache(id);
|
if (!this.avatarHistory.has(id)) {
|
||||||
|
database.removeAvatarFromCache(id);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+4
-2
@@ -112,7 +112,8 @@ html
|
|||||||
el-tabs.zero-margin-tabs(stretch="true" style="height:calc(100% - 60px;margin-top:5px")
|
el-tabs.zero-margin-tabs(stretch="true" style="height:calc(100% - 60px;margin-top:5px")
|
||||||
el-tab-pane
|
el-tab-pane
|
||||||
template(#label)
|
template(#label)
|
||||||
span {{ $t('side_panel.friends') }} ({{ onlineFriendCount }}/{{ friends.size }})
|
span {{ $t('side_panel.friends') }}
|
||||||
|
span(style="color:#909399;font-size:12px;margin-left:10px") ({{ onlineFriendCount }}/{{ friends.size }})
|
||||||
.x-friend-list(style="padding:10px 5px")
|
.x-friend-list(style="padding:10px 5px")
|
||||||
.x-friend-group.x-link(@click="isFriendsGroupMe = !isFriendsGroupMe; saveFriendsGroupStates()" style="padding:0px 0px 5px")
|
.x-friend-group.x-link(@click="isFriendsGroupMe = !isFriendsGroupMe; saveFriendsGroupStates()" style="padding:0px 0px 5px")
|
||||||
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroupMe }")
|
i.el-icon-arrow-right(:class="{ rotate: isFriendsGroupMe }")
|
||||||
@@ -190,7 +191,8 @@ html
|
|||||||
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
|
el-button(type="text" icon="el-icon-close" size="mini" @click.stop="confirmDeleteFriend(friend.id)" style="margin-left:5px")
|
||||||
el-tab-pane
|
el-tab-pane
|
||||||
template(#label)
|
template(#label)
|
||||||
span {{ $t('side_panel.groups') }} ({{ groupInstances.length }})
|
span {{ $t('side_panel.groups') }}
|
||||||
|
span(style="color:#909399;font-size:12px;margin-left:10px") ({{ groupInstances.length }})
|
||||||
.x-friend-list(style="padding:10px 5px")
|
.x-friend-list(style="padding:10px 5px")
|
||||||
.x-friend-item(v-for="ref in groupInstances" :key="ref.instance.id" @click="showGroupDialog(ref.instance.ownerId)")
|
.x-friend-item(v-for="ref in groupInstances" :key="ref.instance.id" @click="showGroupDialog(ref.instance.ownerId)")
|
||||||
.avatar
|
.avatar
|
||||||
|
|||||||
@@ -2281,26 +2281,6 @@ class Database {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
addAvatarToCache(entry) {
|
|
||||||
sqliteService.executeNonQuery(
|
|
||||||
`INSERT OR REPLACE INTO cache_avatar (id, added_at, author_id, author_name, created_at, description, image_url, name, release_status, thumbnail_image_url, updated_at, version) VALUES (@id, @added_at, @author_id, @author_name, @created_at, @description, @image_url, @name, @release_status, @thumbnail_image_url, @updated_at, @version)`,
|
|
||||||
{
|
|
||||||
'@id': entry.id,
|
|
||||||
'@added_at': new Date().toJSON(),
|
|
||||||
'@author_id': entry.authorId,
|
|
||||||
'@author_name': entry.authorName,
|
|
||||||
'@created_at': entry.created_at,
|
|
||||||
'@description': entry.description,
|
|
||||||
'@image_url': entry.imageUrl,
|
|
||||||
'@name': entry.name,
|
|
||||||
'@release_status': entry.releaseStatus,
|
|
||||||
'@thumbnail_image_url': entry.thumbnailImageUrl,
|
|
||||||
'@updated_at': entry.updated_at,
|
|
||||||
'@version': entry.version
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async getAvatarCache() {
|
async getAvatarCache() {
|
||||||
var data = [];
|
var data = [];
|
||||||
await sqliteService.execute((dbRow) => {
|
await sqliteService.execute((dbRow) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user