File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33#include <Windows.h>
44
5- const DWORD EXIT_TIME = 50000 ;
65const DWORD WAIT_TIME = 1000 ;
76
87DWORD GetPidByWindowName (LPCSTR windowName );
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments