Compare commits
16 Commits
v1.0.1
...
6bd5341507
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6bd5341507 | ||
|
|
5284c0dbb6 | ||
|
|
cf520fdf40 | ||
|
|
96c27bb949 | ||
|
|
cc617dd5be | ||
|
|
653a90de62 | ||
|
|
4b16a2a2c4 | ||
|
|
c51d3dafff | ||
|
|
68c2a59d09 | ||
|
|
45a2ccd9f3 | ||
|
|
0ca1caf148 | ||
|
|
7fb1f1de9d | ||
|
|
386cc857b0 | ||
|
|
3e6136983a | ||
|
|
2c1862aed3 | ||
|
|
4b815fc9d1 |
@@ -4,7 +4,7 @@
|
||||
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(ObsidianDragon
|
||||
VERSION 1.0.1
|
||||
VERSION 1.0.0
|
||||
LANGUAGES C CXX
|
||||
DESCRIPTION "DragonX Cryptocurrency Wallet"
|
||||
)
|
||||
@@ -373,14 +373,12 @@ endif()
|
||||
# Windows application icon + VERSIONINFO (.rc -> .res -> linked into .exe)
|
||||
if(WIN32)
|
||||
set(OBSIDIAN_ICO_PATH "${CMAKE_SOURCE_DIR}/res/img/ObsidianDragon.ico")
|
||||
# Generate manifest with version from project()
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest.in
|
||||
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest
|
||||
@ONLY
|
||||
)
|
||||
set(OBSIDIAN_MANIFEST_PATH "${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest")
|
||||
# Generate .rc with version from project()
|
||||
# Version numbers for the VERSIONINFO resource block
|
||||
set(DRAGONX_VER_MAJOR 1)
|
||||
set(DRAGONX_VER_MINOR 0)
|
||||
set(DRAGONX_VER_PATCH 0)
|
||||
set(DRAGONX_VERSION "1.0.0")
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.rc
|
||||
${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc
|
||||
@@ -389,13 +387,6 @@ if(WIN32)
|
||||
set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc)
|
||||
endif()
|
||||
|
||||
# Generate version.h from the single project(VERSION ...) declaration
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/src/config/version.h.in
|
||||
${CMAKE_SOURCE_DIR}/src/config/version.h
|
||||
@ONLY
|
||||
)
|
||||
|
||||
# Generate INCBIN font embedding source with absolute paths to .ttf files
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/src/embedded/embedded_fonts.cpp.in
|
||||
|
||||
21
build.sh
21
build.sh
@@ -271,9 +271,6 @@ build_release_linux() {
|
||||
[[ -f bin/asmap.dat ]] && cp bin/asmap.dat "$dist_dir/"
|
||||
[[ -f bin/sapling-spend.params ]] && cp bin/sapling-spend.params "$dist_dir/"
|
||||
[[ -f bin/sapling-output.params ]] && cp bin/sapling-output.params "$dist_dir/"
|
||||
# Bundle xmrig for mining support
|
||||
local XMRIG_LINUX="$SCRIPT_DIR/prebuilt-binaries/xmrig-hac/xmrig"
|
||||
[[ -f "$XMRIG_LINUX" ]] && { cp "$XMRIG_LINUX" "$dist_dir/"; chmod +x "$dist_dir/xmrig"; info "Bundled xmrig"; } || warn "xmrig not found — mining unavailable in zip"
|
||||
cp -r bin/res "$dist_dir/" 2>/dev/null || true
|
||||
|
||||
# ── Zip ──────────────────────────────────────────────────────────────────
|
||||
@@ -297,14 +294,9 @@ build_release_linux() {
|
||||
|
||||
[[ -f bin/dragonxd ]] && cp bin/dragonxd "$APPDIR/usr/bin/"
|
||||
[[ -f bin/dragonx-cli ]] && cp bin/dragonx-cli "$APPDIR/usr/bin/"
|
||||
# Daemon data files must be alongside the daemon binary (usr/bin/)
|
||||
# because dragonxd searches relative to its own directory.
|
||||
[[ -f bin/asmap.dat ]] && cp bin/asmap.dat "$APPDIR/usr/bin/"
|
||||
[[ -f bin/sapling-spend.params ]] && cp bin/sapling-spend.params "$APPDIR/usr/bin/"
|
||||
[[ -f bin/sapling-output.params ]] && cp bin/sapling-output.params "$APPDIR/usr/bin/"
|
||||
# Bundle xmrig for mining support
|
||||
local XMRIG_LINUX_AI="$SCRIPT_DIR/prebuilt-binaries/xmrig-hac/xmrig"
|
||||
[[ -f "$XMRIG_LINUX_AI" ]] && { cp "$XMRIG_LINUX_AI" "$APPDIR/usr/bin/"; chmod +x "$APPDIR/usr/bin/xmrig"; }
|
||||
[[ -f bin/asmap.dat ]] && cp bin/asmap.dat "$APPDIR/usr/share/ObsidianDragon/"
|
||||
[[ -f bin/sapling-spend.params ]] && cp bin/sapling-spend.params "$APPDIR/usr/share/ObsidianDragon/"
|
||||
[[ -f bin/sapling-output.params ]] && cp bin/sapling-output.params "$APPDIR/usr/share/ObsidianDragon/"
|
||||
|
||||
# Desktop entry
|
||||
cat > "$APPDIR/usr/share/applications/ObsidianDragon.desktop" <<'DESK'
|
||||
@@ -610,13 +602,6 @@ HDR
|
||||
[[ -f "$DD/$f" ]] && cp "$DD/$f" "$dist_dir/"
|
||||
done
|
||||
|
||||
# Bundle Sapling params + asmap for the zip distribution
|
||||
# (The single-file exe has these embedded via INCBIN, but the zip
|
||||
# needs them on disk so the daemon can find them in its work dir.)
|
||||
for f in sapling-spend.params sapling-output.params asmap.dat; do
|
||||
[[ -f "$DD/$f" ]] && cp "$DD/$f" "$dist_dir/"
|
||||
done
|
||||
|
||||
cp -r bin/res "$dist_dir/" 2>/dev/null || true
|
||||
|
||||
# ── Single-file exe (all resources embedded) ────────────────────────────
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="DragonX.ObsidianDragon.Wallet"
|
||||
version="1.0.1.0"
|
||||
version="1.0.0.0"
|
||||
processorArchitecture="amd64"
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
|
||||
<!-- Application identity —————————————————————————————— -->
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="DragonX.ObsidianDragon.Wallet"
|
||||
version="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.0"
|
||||
processorArchitecture="amd64"
|
||||
/>
|
||||
|
||||
<description>ObsidianDragon Wallet</description>
|
||||
|
||||
<!-- Common Controls v6 (themed buttons, etc.) ————————— -->
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity
|
||||
type="win32"
|
||||
name="Microsoft.Windows.Common-Controls"
|
||||
version="6.0.0.0"
|
||||
processorArchitecture="*"
|
||||
publicKeyToken="6595b64144ccf1df"
|
||||
language="*"
|
||||
/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
|
||||
<!-- DPI awareness (Per-Monitor V2) ————————————————————— -->
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
|
||||
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
|
||||
<!-- Supported OS declarations (Windows 7 → 11) ———————— -->
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<!-- Windows 7 -->
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||
<!-- Windows 8 -->
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||
<!-- Windows 8.1 -->
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||
<!-- Windows 10 / 11 -->
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||
</application>
|
||||
</compatibility>
|
||||
|
||||
</assembly>
|
||||
@@ -19,8 +19,8 @@
|
||||
#include <winver.h>
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||
FILEVERSION @DRAGONX_VER_MAJOR@,@DRAGONX_VER_MINOR@,@DRAGONX_VER_PATCH@,0
|
||||
PRODUCTVERSION @DRAGONX_VER_MAJOR@,@DRAGONX_VER_MINOR@,@DRAGONX_VER_PATCH@,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
FILEFLAGS 0x0L
|
||||
FILEOS VOS_NT_WINDOWS32
|
||||
@@ -33,12 +33,12 @@ BEGIN
|
||||
BEGIN
|
||||
VALUE "CompanyName", "DragonX Developers\0"
|
||||
VALUE "FileDescription", "ObsidianDragon Wallet\0"
|
||||
VALUE "FileVersion", "@PROJECT_VERSION@\0"
|
||||
VALUE "FileVersion", "@DRAGONX_VERSION@\0"
|
||||
VALUE "InternalName", "ObsidianDragon\0"
|
||||
VALUE "LegalCopyright", "Copyright 2024-2026 DragonX Developers. GPLv3.\0"
|
||||
VALUE "OriginalFilename", "ObsidianDragon.exe\0"
|
||||
VALUE "ProductName", "ObsidianDragon\0"
|
||||
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
|
||||
VALUE "ProductVersion", "@DRAGONX_VERSION@\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
|
||||
7
setup.sh
7
setup.sh
@@ -627,13 +627,8 @@ XMRIG_SRC="$PROJECT_DIR/external/xmrig-hac"
|
||||
XMRIG_PREBUILT="$PROJECT_DIR/prebuilt-binaries/xmrig-hac"
|
||||
|
||||
# Clean previous prebuilt xmrig binaries so we always rebuild
|
||||
# Only clean the binary for the platform(s) we are actually building,
|
||||
# otherwise a plain ./setup.sh deletes xmrig.exe without rebuilding it.
|
||||
if ! $CHECK_ONLY; then
|
||||
rm -f "$XMRIG_PREBUILT/xmrig" 2>/dev/null || true
|
||||
if $SETUP_WIN; then
|
||||
rm -f "$XMRIG_PREBUILT/xmrig.exe" 2>/dev/null || true
|
||||
fi
|
||||
rm -f "$XMRIG_PREBUILT/xmrig" "$XMRIG_PREBUILT/xmrig.exe" 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Helper: clone xmrig-hac if not present
|
||||
|
||||
32
src/app.cpp
32
src/app.cpp
@@ -1855,34 +1855,10 @@ bool App::startEmbeddedDaemon()
|
||||
}
|
||||
DEBUG_LOGF("Sapling params extracted successfully\n");
|
||||
} else {
|
||||
// Fallback: check for params bundled alongside the executable
|
||||
// (zip distributions bundle sapling-*.params next to the binary)
|
||||
namespace fs = std::filesystem;
|
||||
std::string exe_dir = util::Platform::getExecutableDirectory();
|
||||
std::string daemon_dir = resources::getDaemonDirectory();
|
||||
const char* paramFiles[] = { "sapling-spend.params", "sapling-output.params", "asmap.dat" };
|
||||
bool copied = false;
|
||||
if (!exe_dir.empty()) {
|
||||
std::error_code ec;
|
||||
fs::create_directories(daemon_dir, ec);
|
||||
for (const char* name : paramFiles) {
|
||||
fs::path src = fs::path(exe_dir) / name;
|
||||
fs::path dst = fs::path(daemon_dir) / name;
|
||||
if (fs::exists(src) && !fs::exists(dst)) {
|
||||
DEBUG_LOGF("Copying bundled %s from exe dir to %s\n", name, daemon_dir.c_str());
|
||||
fs::copy_file(src, dst, ec);
|
||||
if (!ec) copied = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (copied && rpc::Connection::verifySaplingParams()) {
|
||||
DEBUG_LOGF("Sapling params copied from exe directory successfully\n");
|
||||
} else {
|
||||
daemon_status_ = "Sapling parameters not found. They should be in: " + rpc::Connection::getSaplingParamsDir();
|
||||
DEBUG_LOGF("Sapling params not found and no embedded resources available!\n");
|
||||
DEBUG_LOGF("Expected location: %s\n", rpc::Connection::getSaplingParamsDir().c_str());
|
||||
return false;
|
||||
}
|
||||
daemon_status_ = "Sapling parameters not found. They should be in: " + rpc::Connection::getSaplingParamsDir();
|
||||
DEBUG_LOGF("Sapling params not found and no embedded resources available!\n");
|
||||
DEBUG_LOGF("Expected location: %s\n", rpc::Connection::getSaplingParamsDir().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
||||
// !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...)
|
||||
|
||||
#define DRAGONX_VERSION "1.0.1"
|
||||
#define DRAGONX_VERSION "1.0.0"
|
||||
#define DRAGONX_VERSION_MAJOR 1
|
||||
#define DRAGONX_VERSION_MINOR 0
|
||||
#define DRAGONX_VERSION_PATCH 1
|
||||
#define DRAGONX_VERSION_PATCH 0
|
||||
|
||||
#define DRAGONX_APP_NAME "ObsidianDragon"
|
||||
#define DRAGONX_ORG_NAME "Hush"
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
// DragonX Wallet - ImGui Edition
|
||||
// Copyright 2024-2026 The Hush Developers
|
||||
// Released under the GPLv3
|
||||
|
||||
#pragma once
|
||||
|
||||
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
||||
// !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...)
|
||||
|
||||
#define DRAGONX_VERSION "@PROJECT_VERSION@"
|
||||
#define DRAGONX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||||
#define DRAGONX_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||||
#define DRAGONX_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||
|
||||
#define DRAGONX_APP_NAME "ObsidianDragon"
|
||||
#define DRAGONX_ORG_NAME "Hush"
|
||||
|
||||
// Default RPC settings
|
||||
#define DRAGONX_DEFAULT_RPC_HOST "127.0.0.1"
|
||||
#define DRAGONX_DEFAULT_RPC_PORT "21769"
|
||||
|
||||
// Coin parameters
|
||||
#define DRAGONX_TICKER "DRGX"
|
||||
#define DRAGONX_COIN_NAME "DragonX"
|
||||
#define DRAGONX_URI_SCHEME "drgx"
|
||||
#define DRAGONX_ZATOSHI_PER_COIN 100000000
|
||||
#define DRAGONX_DEFAULT_FEE 0.0001
|
||||
|
||||
// Config file names
|
||||
#define DRAGONX_CONF_FILENAME "DRAGONX.conf"
|
||||
#define DRAGONX_WALLET_FILENAME "wallet.dat"
|
||||
@@ -466,18 +466,6 @@ bool XmrigManager::startProcess(const std::string& xmrigPath, const std::string&
|
||||
dup2(pipefd[1], STDERR_FILENO);
|
||||
close(pipefd[1]);
|
||||
|
||||
// Detach from controlling terminal's stdin to prevent SIGTTIN/SIGTTOU
|
||||
// when running in a new process group (setpgid below).
|
||||
int devnull = open("/dev/null", O_RDONLY);
|
||||
if (devnull >= 0) {
|
||||
dup2(devnull, STDIN_FILENO);
|
||||
close(devnull);
|
||||
}
|
||||
|
||||
// Ignore job-control signals that a background process group may receive
|
||||
signal(SIGTTIN, SIG_IGN);
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
|
||||
// New process group so we can kill the whole group
|
||||
setpgid(0, 0);
|
||||
|
||||
|
||||
20
src/main.cpp
20
src/main.cpp
@@ -419,20 +419,12 @@ int main(int argc, char* argv[])
|
||||
if (!g_single_instance.tryLock()) {
|
||||
fprintf(stderr, "Another instance of ObsidianDragon is already running.\n");
|
||||
DEBUG_LOGF("Please close the existing instance first.\n");
|
||||
#ifdef _WIN32
|
||||
MessageBoxW(nullptr, L"Another instance of ObsidianDragon is already running.\nPlease close it first.",
|
||||
L"ObsidianDragon", MB_OK | MB_ICONINFORMATION);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Initialize SDL
|
||||
if (!InitSDL()) {
|
||||
fprintf(stderr, "Failed to initialize SDL!\n");
|
||||
#ifdef _WIN32
|
||||
MessageBoxW(nullptr, L"Failed to initialize SDL. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||
#endif
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -503,8 +495,6 @@ int main(int argc, char* argv[])
|
||||
nullptr, nullptr, GetModuleHandleW(nullptr), nullptr);
|
||||
if (!nativeHwnd) {
|
||||
fprintf(stderr, "Failed to create native Win32 window (error %lu)\n", GetLastError());
|
||||
MessageBoxW(nullptr, L"Failed to create window. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
}
|
||||
@@ -544,8 +534,6 @@ int main(int argc, char* argv[])
|
||||
SDL_DestroyProperties(createProps);
|
||||
if (window == nullptr) {
|
||||
fprintf(stderr, "Error: SDL_CreateWindowWithProperties(): %s\n", SDL_GetError());
|
||||
MessageBoxW(nullptr, L"Failed to create SDL window. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||
DestroyWindow(nativeHwnd);
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
@@ -572,8 +560,6 @@ int main(int argc, char* argv[])
|
||||
dragonx::platform::DX11Context dx;
|
||||
if (!dx.init(window)) {
|
||||
fprintf(stderr, "Error: Failed to initialize DirectX 11 context\n");
|
||||
MessageBoxW(nullptr, L"Failed to initialize DirectX 11.\nPlease ensure your graphics drivers are up to date.\n\nCheck the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Graphics Error", MB_OK | MB_ICONERROR);
|
||||
SDL_DestroyWindow(window);
|
||||
SDL_Quit();
|
||||
return 1;
|
||||
@@ -649,8 +635,6 @@ int main(int argc, char* argv[])
|
||||
// Initialize ImGui with DX11 backend
|
||||
if (!InitImGui(window, dx)) {
|
||||
fprintf(stderr, "Failed to initialize ImGui!\n");
|
||||
MessageBoxW(nullptr, L"Failed to initialize ImGui. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||
Shutdown(window, dx);
|
||||
return 1;
|
||||
}
|
||||
@@ -824,10 +808,6 @@ int main(int argc, char* argv[])
|
||||
dragonx::App app;
|
||||
if (!app.init()) {
|
||||
fprintf(stderr, "Failed to initialize application!\n");
|
||||
#ifdef _WIN32
|
||||
MessageBoxW(nullptr, L"Failed to initialize application. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||
#endif
|
||||
#ifdef DRAGONX_USE_DX11
|
||||
Shutdown(window, dx);
|
||||
#else
|
||||
|
||||
@@ -61,8 +61,13 @@ bool DX11Context::init(SDL_Window* window)
|
||||
D3D_FEATURE_LEVEL_10_0,
|
||||
};
|
||||
|
||||
UINT createDeviceFlags = 0;
|
||||
#ifdef DRAGONX_DEBUG
|
||||
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
||||
#endif
|
||||
|
||||
// Need BGRA support for DirectComposition
|
||||
UINT createDeviceFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
createDeviceFlags |= D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||
|
||||
HRESULT hr = D3D11CreateDevice(
|
||||
nullptr, // Default adapter
|
||||
|
||||
@@ -509,18 +509,6 @@ std::string getXmrigPath()
|
||||
return xmrigName;
|
||||
}
|
||||
|
||||
// Check alongside the wallet executable (zip / AppImage distributions)
|
||||
{
|
||||
std::string exeDir = util::Platform::getExecutableDirectory();
|
||||
if (!exeDir.empty()) {
|
||||
std::string exeDirPath = exeDir + "/" + xmrigName;
|
||||
if (std::filesystem::exists(exeDirPath)) {
|
||||
DEBUG_LOGF("[INFO] getXmrigPath: found alongside wallet at %s\n", exeDirPath.c_str());
|
||||
return exeDirPath;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check development paths
|
||||
#ifdef _WIN32
|
||||
// Not applicable for cross-compiled Windows builds
|
||||
|
||||
@@ -757,26 +757,15 @@ inline void ApplySmoothScroll(float speed = 12.0f)
|
||||
s.current = actualY;
|
||||
}
|
||||
|
||||
// Capture mouse wheel when the cursor is inside this child window.
|
||||
// Use a direct position check instead of IsWindowHovered() which can
|
||||
// return false when an ActiveId exists (focused input, held button) or
|
||||
// when tooltip/popup windows from row hovers interfere with hover
|
||||
// routing. Still skip when a real popup (combo dropdown, context menu)
|
||||
// is open so the popup handles its own scrolling.
|
||||
{
|
||||
bool popupOpen = ImGui::IsPopupOpen("", ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel);
|
||||
ImVec2 mpos = ImGui::GetIO().MousePos;
|
||||
ImVec2 wmin = win->Pos;
|
||||
ImVec2 wmax = ImVec2(wmin.x + win->Size.x, wmin.y + win->Size.y);
|
||||
bool inside = (mpos.x >= wmin.x && mpos.x < wmax.x &&
|
||||
mpos.y >= wmin.y && mpos.y < wmax.y);
|
||||
if (!popupOpen && inside) {
|
||||
float wheel = ImGui::GetIO().MouseWheel;
|
||||
if (wheel != 0.0f) {
|
||||
float step = ImGui::GetTextLineHeightWithSpacing() * 3.0f;
|
||||
s.target -= wheel * step;
|
||||
s.target = ImClamp(s.target, 0.0f, scrollMaxY);
|
||||
}
|
||||
// Capture mouse wheel when hovered, but not when a popup (combo dropdown
|
||||
// etc.) is open — let the popup handle its own scrolling exclusively.
|
||||
bool popupOpen = ImGui::IsPopupOpen("", ImGuiPopupFlags_AnyPopupId | ImGuiPopupFlags_AnyPopupLevel);
|
||||
if (!popupOpen && ImGui::IsWindowHovered(ImGuiHoveredFlags_ChildWindows)) {
|
||||
float wheel = ImGui::GetIO().MouseWheel;
|
||||
if (wheel != 0.0f) {
|
||||
float step = ImGui::GetTextLineHeightWithSpacing() * 3.0f;
|
||||
s.target -= wheel * step;
|
||||
s.target = ImClamp(s.target, 0.0f, scrollMaxY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -528,8 +528,7 @@ inline void SettingsScreen::renderAboutSection() {
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - nameSize.x) * 0.5f);
|
||||
Typography::instance().text(TypeStyle::H6, appName);
|
||||
|
||||
char version[64];
|
||||
snprintf(version, sizeof(version), "Version %s-imgui", DRAGONX_VERSION);
|
||||
const char* version = "Version 1.0.0-imgui";
|
||||
ImVec2 versionSize = ImGui::CalcTextSize(version);
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - versionSize.x) * 0.5f);
|
||||
Typography::instance().textColored(TypeStyle::Caption, OnSurfaceMedium(), version);
|
||||
|
||||
@@ -153,15 +153,10 @@ void RenderMiningTab(App* app)
|
||||
s_pool_mode = app->settings()->getPoolMode();
|
||||
strncpy(s_pool_url, app->settings()->getPoolUrl().c_str(), sizeof(s_pool_url) - 1);
|
||||
strncpy(s_pool_worker, app->settings()->getPoolWorker().c_str(), sizeof(s_pool_worker) - 1);
|
||||
s_pool_state_loaded = true;
|
||||
}
|
||||
|
||||
// Default pool worker to user's first shielded address once addresses are available
|
||||
{
|
||||
static bool s_pool_worker_defaulted = false;
|
||||
|
||||
// If pool worker is empty or placeholder, default to user's first address
|
||||
std::string workerStr(s_pool_worker);
|
||||
if (!s_pool_worker_defaulted && !state.addresses.empty() &&
|
||||
(workerStr.empty() || workerStr == "x")) {
|
||||
if (workerStr.empty() || workerStr == "x") {
|
||||
std::string defaultAddr;
|
||||
for (const auto& addr : state.addresses) {
|
||||
if (addr.type == "shielded" && !addr.address.empty()) {
|
||||
@@ -180,10 +175,9 @@ void RenderMiningTab(App* app)
|
||||
if (!defaultAddr.empty()) {
|
||||
strncpy(s_pool_worker, defaultAddr.c_str(), sizeof(s_pool_worker) - 1);
|
||||
s_pool_worker[sizeof(s_pool_worker) - 1] = '\0';
|
||||
s_pool_settings_dirty = true;
|
||||
}
|
||||
s_pool_worker_defaulted = true;
|
||||
}
|
||||
s_pool_state_loaded = true;
|
||||
}
|
||||
|
||||
// Persist pool settings when dirty and no field is active
|
||||
|
||||
Reference in New Issue
Block a user