diff options
author | geni <me@geni.site> | 2021-12-31 14:43:45 +0200 |
---|---|---|
committer | geni <me@geni.site> | 2021-12-31 14:43:45 +0200 |
commit | 24e6b264919b9125a4f78991dc0f42fc7797cbf2 (patch) | |
tree | 617f991e6419b478a27dc52194de67d2778dc979 /LauncherInjector | |
parent | a6a54befbd5a577804a2363e987bbc917abf9ff0 (diff) | |
download | NorthstarLauncher-24e6b264919b9125a4f78991dc0f42fc7797cbf2.tar.gz NorthstarLauncher-24e6b264919b9125a4f78991dc0f42fc7797cbf2.zip |
Clean up
Diffstat (limited to 'LauncherInjector')
-rw-r--r-- | LauncherInjector/main.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/LauncherInjector/main.cpp b/LauncherInjector/main.cpp index 1eca067a..f35a3015 100644 --- a/LauncherInjector/main.cpp +++ b/LauncherInjector/main.cpp @@ -18,7 +18,7 @@ HMODULE hHookModule; HMODULE hTier0Module; wchar_t exePath[4096]; -wchar_t buffer[8196]; +wchar_t buffer[8192]; DWORD GetProcessByName(std::wstring processName) { @@ -173,24 +173,18 @@ bool LoadNorthstar() int main(int argc, char* argv[]) { // checked to avoid starting origin, Northstar.dll will check for -dedicated as well on its own - bool isDedicated = false; - for (int i = 0; i < argc; i++) - if (!strcmp(argv[i], "-dedicated")) - isDedicated = true; - bool noOriginStartup = false; for (int i = 0; i < argc; i++) - if (!strcmp(argv[i], "-noOriginStartup")) + if (!strcmp(argv[i], "-noOriginStartup") || !strcmp(argv[i], "-dedicated")) noOriginStartup = true; - if (!isDedicated && !noOriginStartup) + if (!noOriginStartup) { EnsureOriginStarted(); } { - - if (!GetExePathWide(exePath, 4096)) + if (!GetExePathWide(exePath, sizeof(exePath))) { MessageBoxA(GetForegroundWindow(), "Failed getting game directory.\nThe game cannot continue and has to exit.", "Northstar Launcher Error", 0); return 1; |