File tree Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Expand file tree Collapse file tree 3 files changed +8
-13
lines changed Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
149149- Deprecated: ` serverinfo/subscribe `
150150 - Use ` subscribe ` / ` unsubscribe ` subcommands instead
151151- Deprecated: DirectX grabber in favour of the new DXGI DDA grabber
152+ - Removed "-c" console option on Windows. Hyperion can be started via terminal to get the required console output
152153
153154## [ 2.0.16] ( https://github.com/hyperion-project/hyperion.ng/releases/tag/2.0.16 ) - 2024-01
154155
Original file line number Diff line number Diff line change 11#include <Windows.h>
22
3- void openConsole (bool isShowConsole )
3+ bool openConsole (bool isShowConsole )
44{
5- if (AttachConsole (ATTACH_PARENT_PROCESS ) || (isShowConsole && AllocConsole ())) {
5+ if (AttachConsole (ATTACH_PARENT_PROCESS ))
6+ {
67 FILE * fp ;
78 freopen_s (& fp , "CONOUT$" , "w" , stdout );
89 freopen_s (& fp , "CONOUT$" , "w" , stderr );
910 SetConsoleTitle (TEXT ("Hyperion" ));
1011 SetConsoleOutputCP (CP_UTF8 );
12+ return true;
1113 }
14+ return false;
1215}
Original file line number Diff line number Diff line change @@ -167,8 +167,8 @@ int main(int argc, char** argv)
167167 parser.process (*qApp);
168168
169169#ifdef WIN32
170- bool isShowConsole = parser. isSet (consoleOption);
171- openConsole (isShowConsole );
170+ // Attach the output to an existing console if available
171+ openConsole (false );
172172#endif
173173
174174 if (parser.isSet (versionOption))
@@ -494,14 +494,5 @@ int main(int argc, char** argv)
494494
495495 Info (log, " Application ended with code %d" , exitCode);
496496
497- #ifdef _WIN32
498- if (parser.isSet (consoleOption))
499- {
500- system (" pause" );
501- }
502- #endif
503-
504- Logger::deleteInstance ();
505-
506497 return exitCode;
507498}
You can’t perform that action at this time.
0 commit comments