Skip to content

Commit 719a5a2

Browse files
authored
adds request for Microphone access (#229)
1 parent dd8976b commit 719a5a2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

UnitystationLauncher/GameCommunicationPipe/PipeHubBuildCommunication.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,25 @@ The main purpose of this Prompt is to allow the Variable viewer (Variable editin
106106
What follows is given by the build, we do not control what is written in the Following text So treat with caution and use your brain
107107
Justification : " + requests[1]); //TODO Add text
108108

109+
string response = await msgBox.ShowAsync();
110+
Log.Information($"response {response}");
111+
await _writer.WriteLineAsync(response == "No" ? false.ToString() : true.ToString());
112+
await _writer.FlushAsync();
113+
return Task.CompletedTask;
114+
});
115+
}
116+
else if (ClientRequest.Microphone_Access.ToString() == requests[0])
117+
{
118+
RxApp.MainThreadScheduler.ScheduleAsync(async (_, _) =>
119+
{
120+
IMsBox<string> msgBox = MessageBoxBuilder.CreateMessageBox(
121+
MessageBoxButtons.YesNo,
122+
string.Empty,
123+
$"The build would like to Access your microphone" + @"
124+
Do you allow this application to access your microphone for while it is open
125+
Justification given by the Fork : " + requests[1]);
126+
127+
109128
string response = await msgBox.ShowAsync();
110129
Log.Information($"response {response}");
111130
await _writer.WriteLineAsync(response == "No" ? false.ToString() : true.ToString());

UnitystationLauncher/Models/Enums/ClientRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ internal enum ClientRequest
55
URL = 1,
66
API_URL = 2,
77
Host_Trust_Mode = 3,
8+
Microphone_Access = 4
89
}

0 commit comments

Comments
 (0)