diff options
| author | bitflash-coin <bookofshamers@outlook.com> | 2026-08-04 06:34:32 -0700 |
|---|---|---|
| committer | bitflash-coin <bookofshamers@outlook.com> | 2026-08-04 06:34:32 -0700 |
| commit | 5ce650382352c1503f40abf08129ada69402af55 (patch) | |
| tree | 6a18198901f1e2c4933f1ac53c9365eec512bf63 /src/headless.cpp | |
| parent | f34113291da7e5e3dc7d2468d4f9c212c05c584b (diff) | |
public commit
Diffstat (limited to 'src/headless.cpp')
| -rw-r--r-- | src/headless.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/headless.cpp b/src/headless.cpp new file mode 100644 index 0000000..3372936 --- /dev/null +++ b/src/headless.cpp | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | // Copyright (c) 2026 Bitflash developers | ||
| 2 | // Distributed under the MIT/X11 software license. | ||
| 3 | // | ||
| 4 | // Stand-ins for the handful of symbols the node core expects the GUI to | ||
| 5 | // provide, so a headless binary can be linked without ImGui, GLFW or OpenGL. | ||
| 6 | // | ||
| 7 | // This exists because linking the GUI made the node need libGL at load time | ||
| 8 | // even when started with -nogui: the dynamic loader resolves everything before | ||
| 9 | // main() runs, so the flag came far too late. On a clean server -- which is | ||
| 10 | // where a node most naturally lives -- that is a hard failure with an error | ||
| 11 | // message about shared libraries and no hint that the program would otherwise | ||
| 12 | // have worked fine. | ||
| 13 | |||
| 14 | #include "headers_core.h" | ||
| 15 | |||
| 16 | // The GUI uses this to mark itself dirty. With no window to repaint there is | ||
| 17 | // nothing to do, and the call sites in main.cpp and net.cpp stay unchanged. | ||
| 18 | void MainFrameRepaint() | ||
| 19 | { | ||
| 20 | } | ||