Skip to content

Commit

Permalink
fix ATA freezing while mirroring screen
Browse files Browse the repository at this point in the history
  • Loading branch information
msartore committed Feb 6, 2024
1 parent a0ffba1 commit 20a00b8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
6 changes: 3 additions & 3 deletions ATA-GUI/ATA-GUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<ApplicationIcon>ATALogoGUI.ico</ApplicationIcon>

<!-- Versioning -->
<Version>3.4.4.0</Version>
<FileVersion>3.4.4.0</FileVersion>
<AssemblyVersion>3.4.4.0</AssemblyVersion>
<Version>3.4.5.0</Version>
<FileVersion>3.4.5.0</FileVersion>
<AssemblyVersion>3.4.5.0</AssemblyVersion>
<Copyright>© 2021-2024 Massimiliano Sartore</Copyright>

<!-- Publish settings -->
Expand Down
2 changes: 1 addition & 1 deletion ATA-GUI/Classes/ATA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace ATA_GUI.Classes
{
internal class ATA
{
public static readonly string CURRENTVERSION = "v3.4.4";
public static readonly string CURRENTVERSION = "v3.4.5";
public static readonly string IPFileName = "IPList.txt";

public HashSet<string> IPList { get; } = new HashSet<string>();
Expand Down
4 changes: 2 additions & 2 deletions ATA-GUI/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ private void buttonMobileScreenShare_Click(object sender, EventArgs e)
{
if (File.Exists("scrcpy.exe"))
{
_ = ConsoleProcess.scrcpyProcess("-s " + ATA.CurrentDeviceSelected.ID);
ConsoleProcess.scrcpyProcess("-s " + ATA.CurrentDeviceSelected.ID);
}
else
{
Expand Down Expand Up @@ -2050,7 +2050,7 @@ private void buttonCamera_Click(object sender, EventArgs e)
{
if (File.Exists("scrcpy.exe"))
{
string[] result = ConsoleProcess.scrcpyProcess("--version").Split(' ');
string[] result = ConsoleProcess.scrcpyVersion("--version").Split(' ');
foreach (string item in result)
{
if (item.Contains("."))
Expand Down
10 changes: 9 additions & 1 deletion ATA-GUI/Utils/ConsoleProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,19 @@ public static string adbFastbootCommandR(string[] args, int type)
return ret.ToString().Trim();
}

public static string scrcpyProcess(string arguments)
public static string scrcpyVersion(string arguments)
{
return systemProcess("", "scrcpy.exe", arguments);
}

public static void scrcpyProcess(string arguments)
{
_ = Task.Run(() =>
{
return systemProcess("", "scrcpy.exe", arguments);
});
}

public static string systemProcess(string command, string exe, string arguments)
{
Process cmd = new();
Expand Down

0 comments on commit 20a00b8

Please sign in to comment.