console and mining tab visual improvements
This commit is contained in:
21
src/app.h
21
src/app.h
@@ -11,6 +11,7 @@
|
||||
#include <atomic>
|
||||
#include <chrono>
|
||||
#include "data/wallet_state.h"
|
||||
#include "rpc/connection.h"
|
||||
#include "ui/sidebar.h"
|
||||
#include "ui/windows/console_tab.h"
|
||||
#include "imgui.h"
|
||||
@@ -20,7 +21,6 @@ namespace dragonx {
|
||||
namespace rpc {
|
||||
class RPCClient;
|
||||
class RPCWorker;
|
||||
struct ConnectionConfig;
|
||||
}
|
||||
namespace config { class Settings; }
|
||||
namespace daemon { class EmbeddedDaemon; class XmrigManager; }
|
||||
@@ -79,6 +79,15 @@ public:
|
||||
*/
|
||||
void update();
|
||||
|
||||
/**
|
||||
* @brief Pre-frame tasks that must run BEFORE ImGui::NewFrame().
|
||||
*
|
||||
* Font atlas rebuilds (hot-reload, user font scale changes) must
|
||||
* happen before NewFrame() because NewFrame() caches font pointers.
|
||||
* Rebuilding mid-frame causes dangling pointer crashes.
|
||||
*/
|
||||
void preFrame();
|
||||
|
||||
/**
|
||||
* @brief Render the application UI (called every frame)
|
||||
*/
|
||||
@@ -313,6 +322,16 @@ private:
|
||||
// Subsystems
|
||||
std::unique_ptr<rpc::RPCClient> rpc_;
|
||||
std::unique_ptr<rpc::RPCWorker> worker_;
|
||||
|
||||
// Fast-lane: dedicated RPC connection + worker for 1-second mining polls.
|
||||
// Runs on its own thread with its own curl handle so it never blocks behind
|
||||
// the main refresh batch.
|
||||
std::unique_ptr<rpc::RPCClient> fast_rpc_;
|
||||
std::unique_ptr<rpc::RPCWorker> fast_worker_;
|
||||
|
||||
// Saved connection credentials (needed to open the fast-lane connection)
|
||||
rpc::ConnectionConfig saved_config_;
|
||||
|
||||
std::unique_ptr<config::Settings> settings_;
|
||||
std::unique_ptr<daemon::EmbeddedDaemon> embedded_daemon_;
|
||||
std::unique_ptr<daemon::XmrigManager> xmrig_manager_;
|
||||
|
||||
Reference in New Issue
Block a user