diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-26 03:16:46 +0100 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-05-26 03:16:46 +0100 |
commit | cc7b0ded08e3dc26fc970169a79c74c54e4f923b (patch) | |
tree | 6de8896695ab89534adaa912b9fdfac9d6bf396c /LauncherInjector | |
parent | 93d540dd37298b9e9a6c1f07b5c4a8dc46a2787d (diff) | |
download | NorthstarLauncher-cc7b0ded08e3dc26fc970169a79c74c54e4f923b.tar.gz NorthstarLauncher-cc7b0ded08e3dc26fc970169a79c74c54e4f923b.zip |
lots of cleanup and starting moving to new hooking macros
Diffstat (limited to 'LauncherInjector')
-rw-r--r-- | LauncherInjector/LauncherInjector.vcxproj | 6 | ||||
-rw-r--r-- | LauncherInjector/main.cpp | 17 |
2 files changed, 18 insertions, 5 deletions
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 @@ <AdditionalDependencies>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)</AdditionalDependencies> <StackReserveSize>8000000</StackReserveSize> </Link> + <PostBuildEvent> + <Command>copy /Y "$(TargetPath)" "D:\origin\titanfall\Titanfall2"</Command> + </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> @@ -85,6 +88,9 @@ <AdditionalDependencies>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)</AdditionalDependencies> <StackReserveSize>8000000</StackReserveSize> </Link> + <PostBuildEvent> + <Command>copy /Y "$(TargetPath)" "D:\origin\titanfall\Titanfall2"</Command> + </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="main.cpp" /> 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, "<LSX>")); // ensure we're actually getting data from lsx } - WSACleanup(); + WSACleanup(); // cleanup sockets and such so game can contact lsx itself } void EnsureOriginStarted() |