Commit 950f32c4 authored by Martin Schultz's avatar Martin Schultz
Browse files

ttach Openflipper to running parent console if possible

parent e74c7b1a
......@@ -117,6 +117,18 @@
#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);
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment