mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Don't resume threads created with CREATE_SUSPENDED
This fixes errors in Unity 5.6 when it creates baking processes.
This commit is contained in:
committed by
Baldur Karlsson
parent
e5ec2c7280
commit
f22d38bc63
@@ -276,6 +276,7 @@ private:
|
||||
*lpProcessInformation = dummy;
|
||||
}
|
||||
|
||||
bool resume = (dwCreationFlags & CREATE_SUSPENDED) == 0;
|
||||
dwCreationFlags |= CREATE_SUSPENDED;
|
||||
|
||||
BOOL ret = realFunc(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes,
|
||||
@@ -328,7 +329,10 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
ResumeThread(lpProcessInformation->hThread);
|
||||
if(resume)
|
||||
{
|
||||
ResumeThread(lpProcessInformation->hThread);
|
||||
}
|
||||
|
||||
// ensure we clean up after ourselves
|
||||
if(dummy.dwProcessId != 0)
|
||||
@@ -360,6 +364,7 @@ private:
|
||||
*lpProcessInformation = dummy;
|
||||
}
|
||||
|
||||
bool resume = (dwCreationFlags & CREATE_SUSPENDED) == 0;
|
||||
dwCreationFlags |= CREATE_SUSPENDED;
|
||||
|
||||
BOOL ret = realFunc(lpApplicationName, lpCommandLine, lpProcessAttributes, lpThreadAttributes,
|
||||
@@ -414,7 +419,10 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
ResumeThread(lpProcessInformation->hThread);
|
||||
if(resume)
|
||||
{
|
||||
ResumeThread(lpProcessInformation->hThread);
|
||||
}
|
||||
|
||||
// ensure we clean up after ourselves
|
||||
if(dummy.dwProcessId != 0)
|
||||
|
||||
Reference in New Issue
Block a user