Skip to content

Commit 984b93d

Browse files
committed
Make modloader exit on input
1 parent be92eb1 commit 984b93d

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

src/Inject.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include <Windows.h>
44

5-
const DWORD EXIT_TIME = 50000;
65
const DWORD WAIT_TIME = 1000;
76

87
DWORD GetPidByWindowName(LPCSTR windowName);

src/Main.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int main(int argc, char *argv[])
6868
if (!launchSuccess)
6969
{
7070
std::cout << "Launching game failed, error: " << GetLastErrorString() << std::endl;
71-
Sleep(EXIT_TIME);
71+
system("pause");
7272
return -1;
7373
}
7474

@@ -80,7 +80,7 @@ int main(int argc, char *argv[])
8080
if (windowName.empty())
8181
{
8282
std::cout << "Failed to find window name. Does the file '.\\Modloader\\window_name.txt' with a proper window name exist?";
83-
Sleep(EXIT_TIME);
83+
system("pause");
8484
return -1;
8585
}
8686

@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
102102
if (ph == NULL)
103103
{
104104
std::cout << "Failed to get game process, error: " << GetLastErrorString() << std::endl;
105-
Sleep(EXIT_TIME);
105+
system("pause");
106106
return -1;
107107
}
108108

@@ -115,13 +115,13 @@ int main(int argc, char *argv[])
115115
if (!injectSuccess)
116116
{
117117
std::cout << "Failed to load mod, error: " << GetLastErrorString() << std::endl;
118-
Sleep(EXIT_TIME);
118+
system("pause");
119119
return -1;
120120
}
121121
}
122122

123123
std::cout << "Finished loading all mods :)" << std::endl;
124124

125-
Sleep(EXIT_TIME);
125+
system("pause");
126126
return 0;
127127
}

0 commit comments

Comments
 (0)