Skip to content

Commit

Permalink
fixed DBus backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
TauAkiou committed Apr 6, 2022
1 parent 5e46ccf commit c18e14c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 2 additions & 3 deletions AUCapture-GTK/IPC/DBus/IPCAdapterDBus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,8 @@ public override URIStartResult HandleURIStart(string[] args)

foreach (ProcessModule mod in capproc.Modules)
{
// If we find amonguscapturedll in the modules, we can be certain
// that the located pid is, in fact, an AmongUsCapture process.
if (mod.ModuleName == "AmongUsCapture.dll")
// Look for the AUCapture-GTK Module to insure that the capture is in fact a caputre process.
if (mod.ModuleName == "AUCapture-GTK")
{
iscapture = true;
break;
Expand Down
9 changes: 8 additions & 1 deletion AUCapture-GTK/MainGTKWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public MainGTKWindow(ClientSocket sock) : base("Among Us Capture - GTK")
InitializeWindow();
GameMemReader.getInstance().ProcessHook += _eventGameIsHooked;
GameMemReader.getInstance().ProcessUnHook += _eventGameIsUnhooked;
IPCAdapter.getInstance().OnToken += _eventOnTokenHandler;


// Load URL
Expand Down Expand Up @@ -204,7 +205,7 @@ private void _primaryWindowInstallLinkWindow_Dialog(object o, EventArgs e) {
"\n\nIf you decline, Discord connection links will not be functional." +
"\n\nYou can install or manage One-Click support by using the \"One-Click Connection Management\" link in the File menu.";

InstallLinkDialogBox.Text = info;
InstallLinkDialogBox.Text = info;
InstallLinkDialogBox.Title = "Enable One-Click Connection?";
InstallLinkDialogBox.AddButton("Cancel", ResponseType.Reject);
InstallLinkDialogBox.AddButton("Install", ResponseType.Accept);
Expand Down Expand Up @@ -498,6 +499,12 @@ private void _consoleTextView_BufferChanged(object sender, EventArgs e)
}

}

public void _eventOnTokenHandler(object sender, StartToken token)
{
Logger.Info("Attempting to connect to host: {host} with connect code: {connectCode}", token.Host, token.ConnectCode);
clientSocket.Connect(token.Host, token.ConnectCode);
}

public void WriteConsoleLineFormatted(string moduleName, Color moduleColor, string message)
{
Expand Down

0 comments on commit c18e14c

Please sign in to comment.