mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-12 03:13:50 +02:00
Bug fixes
This commit is contained in:
@@ -119,29 +119,21 @@ namespace VRCX
|
||||
}
|
||||
if (!File.Exists(UnityPlayerDll))
|
||||
{
|
||||
using (var key = Registry.ClassesRoot.OpenSubKey(@"VRChat\shell\open\command"))
|
||||
try
|
||||
{
|
||||
// "C:\Program Files (x86)\Steam\steamapps\common\VRChat\launch.exe" "%1" %*
|
||||
var match = Regex.Match(key.GetValue(string.Empty) as string, "(?!\")(.+?\\\\VRChat.*)(!?\\\\launch.exe\")");
|
||||
if (match.Success == true)
|
||||
using (var key = Registry.ClassesRoot.OpenSubKey(@"VRChat\shell\open\command"))
|
||||
{
|
||||
// "C:\Program Files (x86)\Steam\steamapps\common\VRChat\launch.exe" "%1" %*
|
||||
var match = Regex.Match(key.GetValue(string.Empty) as string, "(?!\")(.+?\\\\VRChat.*)(!?\\\\launch.exe\")");
|
||||
var fileLocation = Path.Combine(match.Groups[1].Value, "UnityPlayer.dll");
|
||||
if (File.Exists(fileLocation))
|
||||
{
|
||||
File.Copy(fileLocation, Path.Combine(Program.BaseDirectory, "AssetBundleCacher\\UnityPlayer.dll"));
|
||||
}
|
||||
else
|
||||
{
|
||||
DownloadProgress = -11;
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
DownloadProgress = -11;
|
||||
return;
|
||||
File.Copy(fileLocation, Path.Combine(Program.BaseDirectory, "AssetBundleCacher\\UnityPlayer.dll"));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
DownloadProgress = -11;
|
||||
return;
|
||||
}
|
||||
}
|
||||
DownloadProgress = 0;
|
||||
VRChatCacheLocation = GetVRChatCacheLocation(cacheDir);
|
||||
|
||||
@@ -8089,6 +8089,12 @@ speechSynthesis.getVoices();
|
||||
this.notificationTTSVoice = index;
|
||||
configRepository.setString('VRCX_notificationTTSVoice', this.notificationTTSVoice);
|
||||
var voices = speechSynthesis.getVoices();
|
||||
if (voices.length === 0) {
|
||||
return;
|
||||
}
|
||||
if (index > voices.length) {
|
||||
index = 0;
|
||||
}
|
||||
var voiceName = voices[index].name;
|
||||
speechSynthesis.cancel();
|
||||
this.speak(voiceName);
|
||||
|
||||
Reference in New Issue
Block a user