From cc7b0ded08e3dc26fc970169a79c74c54e4f923b Mon Sep 17 00:00:00 2001
From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com>
Date: Thu, 26 May 2022 03:16:46 +0100
Subject: lots of cleanup and starting moving to new hooking macros
---
LauncherInjector/LauncherInjector.vcxproj | 6 ++++++
LauncherInjector/main.cpp | 17 ++++++++++++-----
2 files changed, 18 insertions(+), 5 deletions(-)
(limited to 'LauncherInjector')
diff --git a/LauncherInjector/LauncherInjector.vcxproj b/LauncherInjector/LauncherInjector.vcxproj
index 8870c732..0c727918 100644
--- a/LauncherInjector/LauncherInjector.vcxproj
+++ b/LauncherInjector/LauncherInjector.vcxproj
@@ -65,6 +65,9 @@
shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
8000000
+
+ copy /Y "$(TargetPath)" "D:\origin\titanfall\Titanfall2"
+
@@ -85,6 +88,9 @@
shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
8000000
+
+ copy /Y "$(TargetPath)" "D:\origin\titanfall\Titanfall2"
+
diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp
index 0fb025a7..99e5ba15 100644
--- a/LauncherInjector/main.cpp
+++ b/LauncherInjector/main.cpp
@@ -147,15 +147,22 @@ void AwaitOriginStartup()
std::cout << "LSX: connect()" << std::endl;
connect(sock, (struct sockaddr*)&lsxAddr, sizeof(lsxAddr));
-
+
char buf[4096];
- recv(sock, buf, 4096, 0);
- std::cout << buf << std::endl;
+ memset(buf, 0, sizeof(buf));
+
+ do
+ {
+ recv(sock, buf, 4096, 0);
+ std::cout << buf << std::endl;
- Sleep(8000);
+ // honestly really shit, this isn't needed for origin due to being able to check OriginClientService
+ // but for ea desktop we don't have anything like this, so atm we just have to wait to ensure that we start after logging in
+ Sleep(8000);
+ } while (!strstr(buf, "")); // ensure we're actually getting data from lsx
}
- WSACleanup();
+ WSACleanup(); // cleanup sockets and such so game can contact lsx itself
}
void EnsureOriginStarted()
--
cgit v1.2.3