aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-11-12 14:46:57 +0100
committerGitHub <noreply@github.com>2022-11-12 13:46:57 +0000
commit3514e4478ae2523df882721a0a22d47d1ced99c3 (patch)
tree140cee3e2a985e0ce8f99ac1805509bba6046b6e
parente8334b4a55b1daf6f1b9186cc5b0a158976c3e8c (diff)
downloadNorthstarLauncher-3514e4478ae2523df882721a0a22d47d1ced99c3.tar.gz
NorthstarLauncher-3514e4478ae2523df882721a0a22d47d1ced99c3.zip
Restore `-waitfordebugger` flag (#321)
* Update main.cpp * Update NorthstarLauncher/main.cpp Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Co-authored-by: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>
-rw-r--r--NorthstarLauncher/main.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/NorthstarLauncher/main.cpp b/NorthstarLauncher/main.cpp
index 92c7de7a..17128e5b 100644
--- a/NorthstarLauncher/main.cpp
+++ b/NorthstarLauncher/main.cpp
@@ -324,6 +324,15 @@ HMODULE LoadDediStub(const char* name)
int main(int argc, char* argv[])
{
+ if (strstr(GetCommandLineA(), "-waitfordebugger"))
+ {
+ while (!IsDebuggerPresent())
+ {
+ // Sleep 100ms to give debugger time to attach.
+ Sleep(100);
+ }
+ }
+
if (!GetExePathWide(exePath, sizeof(exePath)))
{
MessageBoxA(