Small fixes

This commit is contained in:
Natsumi
2022-07-02 06:43:06 +12:00
parent 59bb021cd1
commit 80b2c4548f
2 changed files with 17 additions and 9 deletions

View File

@@ -7,13 +7,16 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.Diagnostics;
namespace VRCX
{
class Update
internal class Update
{
public static void Check()
{
if (Process.GetProcessesByName("VRCX_Setup").Length > 0)
Environment.Exit(0);
if (File.Exists(Path.Combine(Program.AppDataDirectory, "VRCX_Setup.exe")))
File.Delete(Path.Combine(Program.AppDataDirectory, "VRCX_Setup.exe"));
if (File.Exists(Path.Combine(Program.AppDataDirectory, "update.exe")))
@@ -24,14 +27,17 @@ namespace VRCX
{
try
{
if (!File.Exists(Path.Combine(Program.AppDataDirectory, "update.exe")))
return;
File.Move(Path.Combine(Program.AppDataDirectory, "update.exe"), Path.Combine(Program.AppDataDirectory, "VRCX_Setup.exe"));
System.Diagnostics.Process VRCXProcess = new System.Diagnostics.Process();
VRCXProcess.StartInfo.FileName = Path.Combine(Program.AppDataDirectory, "VRCX_Setup.exe");
VRCXProcess.StartInfo.Arguments = "/S";
var VRCXProcess = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = Path.Combine(Program.AppDataDirectory, "VRCX_Setup.exe"),
Arguments = "/S"
}
};
VRCXProcess.Start();
System.Environment.Exit(0);
Environment.Exit(0);
}
catch (Exception e)
{
@@ -39,4 +45,4 @@ namespace VRCX
}
}
}
}
}

View File

@@ -274,6 +274,7 @@ speechSynthesis.getVoices();
ara: 'العربية',
ron: 'Română',
vie: 'Tiếng Việt',
ukr: 'украї́нська',
ase: 'American Sign Language',
bfi: 'British Sign Language',
dse: 'Dutch Sign Language',
@@ -306,6 +307,7 @@ speechSynthesis.getVoices();
ara: 'ae',
ron: 'ro',
vie: 'vn',
ukr: 'ua',
ase: 'us',
bfi: 'gb',
dse: 'nl',
@@ -8998,7 +9000,7 @@ speechSynthesis.getVoices();
var text = `SpawnEmoji ${this.photonEmojis[eventData.Data]}`;
} else {
var eventVrc = '';
if (eventData.Data) {
if (eventData.Data.length > 0) {
eventVrc = ` ${JSON.stringify(eventData.Data).replace(
/"([^(")"]+)":/g,
'$1:'