mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-25 14:57:20 +00:00
[c-host] windows: don't attach to the debuggers console
This commit is contained in:
parent
e75f3a7278
commit
2d9f578719
@ -160,7 +160,7 @@ static BOOL WINAPI CtrlHandler(DWORD dwCtrlType)
|
|||||||
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
|
||||||
{
|
{
|
||||||
/* this is a bit of a hack but without this --help will produce no output in a windows command prompt */
|
/* this is a bit of a hack but without this --help will produce no output in a windows command prompt */
|
||||||
if (AttachConsole(ATTACH_PARENT_PROCESS))
|
if (!IsDebuggerPresent() && AttachConsole(ATTACH_PARENT_PROCESS))
|
||||||
{
|
{
|
||||||
HANDLE std_err = GetStdHandle(STD_ERROR_HANDLE);
|
HANDLE std_err = GetStdHandle(STD_ERROR_HANDLE);
|
||||||
HANDLE std_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
HANDLE std_out = GetStdHandle(STD_OUTPUT_HANDLE);
|
||||||
|
Loading…
Reference in New Issue
Block a user