Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
950f32c4
Commit
950f32c4
authored
Jul 27, 2016
by
Martin Schultz
Browse files
ttach Openflipper to running parent console if possible
parent
e74c7b1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
OpenFlipper.cc
View file @
950f32c4
...
...
@@ -117,6 +117,18 @@
#endif
#ifdef WIN32
void
attachExistingConsole
()
{
//try to attach the console of the parent process
if
(
AttachConsole
(
-
1
))
{
//if the console was attached change stdinput and output
freopen
(
"CONIN$"
,
"r"
,
stdin
);
freopen
(
"CONOUT$"
,
"w"
,
stdout
);
freopen
(
"CONOUT$"
,
"w"
,
stderr
);
}
}
#ifdef WIN_GET_DEBUG_CONSOLE
void
getConsole
()
{
//Create a console for this application
...
...
@@ -371,6 +383,7 @@ int main(int argc, char **argv)
OpenFlipper
::
Options
::
windowTitle
(
TOSTRING
(
PRODUCT_STRING
)
" v"
+
OpenFlipper
::
Options
::
coreVersion
());
#ifdef WIN32
attachExistingConsole
();
#ifdef WIN_GET_DEBUG_CONSOLE
getConsole
();
#endif
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment