Skip to content

Commit 0607108

Browse files
committed
wait infinitely for hl2 to exit and don't close if someone hits a random key on the command prompt
1 parent 50655f8 commit 0607108

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

RawInput2/main.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -684,13 +684,6 @@ int main()
684684

685685
PEInjector(processID, InjectionEntryPoint);
686686

687-
while (1)
688-
{
689-
if (WaitForSingleObject(g_hProcess, 0) != WAIT_TIMEOUT)
690-
return 0;
691-
if (_kbhit() && _getch() != VK_RETURN)
692-
return 0;
693-
Sleep(500);
694-
}
687+
WaitForSingleObject(g_hProcess, INFINITE);
695688
return 0;
696-
}
689+
}

0 commit comments

Comments
 (0)