diff --git a/src/daemon/embedded_daemon.cpp b/src/daemon/embedded_daemon.cpp index e4487eb..e922cbd 100644 --- a/src/daemon/embedded_daemon.cpp +++ b/src/daemon/embedded_daemon.cpp @@ -689,7 +689,10 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec debug_log_path_.c_str(), debug_log_offset_); } - // Launch daemon with CREATE_NEW_CONSOLE (hidden via SW_HIDE). + // Launch daemon windowless. Use CREATE_NO_WINDOW (NOT CREATE_NEW_CONSOLE): CREATE_NEW_CONSOLE + // allocates a console window that briefly flashes on screen before SW_HIDE can hide it, which is + // visible as a console-window flash on wallet launch. CREATE_NO_WINDOW gives the console child no + // window at all (same approach as the xmrig launcher). The daemon logs to debug.log, not a console. // The daemon binary must NOT be in the data directory (%APPDATA%\Hush\DRAGONX) // — it must be in /dragonx/ to avoid conflicts with lock files and data. STARTUPINFOA si; @@ -699,7 +702,7 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec si.dwFlags = STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; ZeroMemory(&pi, sizeof(pi)); - + char* cmd_line = _strdup(cmd.c_str()); BOOL success = CreateProcessA( NULL, @@ -707,7 +710,7 @@ bool EmbeddedDaemon::startProcess(const std::string& binary_path, const std::vec NULL, NULL, FALSE, - CREATE_NEW_CONSOLE, + CREATE_NO_WINDOW, NULL, work_dir.c_str(), &si,