From 6f7286f2e433156cadbcc5e207d115b66bb33b2d Mon Sep 17 00:00:00 2001 From: Sergey004 Date: Thu, 2 Nov 2023 08:06:14 +0400 Subject: [PATCH] Save --- .gitignore | 1 + Quest2-VRC/Services/Sender.cs | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index db5ad06..398cf66 100644 --- a/.gitignore +++ b/.gitignore @@ -398,3 +398,4 @@ FodyWeavers.xsd *.sln.iml /.editorconfig /Quest2-VRC.GUI/vars.json +/Quest2-VRC.GUI/odtout.txt diff --git a/Quest2-VRC/Services/Sender.cs b/Quest2-VRC/Services/Sender.cs index 839748f..96e3fb7 100644 --- a/Quest2-VRC/Services/Sender.cs +++ b/Quest2-VRC/Services/Sender.cs @@ -19,17 +19,17 @@ static class Sender { - public static async void Run(bool wirlessmode, bool audioEnadled) + public static async void Run(bool wirlessmode, bool audioEnadled, bool disableerrmsg) { var udpPort = Extensions.GetAvailableUdpPort(); int Uport = udpPort; Console.WriteLine("OSC UDP port is {0}", Uport); - await questwd(Uport, wirlessmode, audioEnadled); + await questwd(Uport, wirlessmode, audioEnadled, disableerrmsg); } - public static async Task questwd(int Uport, bool wirlessmode, bool audioEnadled) + public static async Task questwd(int Uport, bool wirlessmode, bool audioEnadled, bool disableerrmsg) { // Create a bogus port for the client OscPacket.UdpClient = new UdpClient(Uport); @@ -172,8 +172,11 @@ public static async Task questwd(int Uport, bool wirlessmode, bool audioEnadled) { string inputbox = "input"; LogToConsole("Error: Connection to the headset is lost! Waiting for reconnect..."); - VRChatMessage MsgErr = new VRChatMessage(inputbox, "Error: Connection to the headset is lost! Waiting for reconnect..."); - SendPacket(MsgErr); + if (disableerrmsg == false) + { + VRChatMessage MsgErr = new VRChatMessage(inputbox, "Error: Connection to the headset is lost! Waiting for reconnect..."); + SendPacket(MsgErr); + } await Task.Delay(3000); }