diff --git a/src/app.cpp b/src/app.cpp index 521ea28..51713c9 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1216,7 +1216,12 @@ void App::render() } logoPath = util::getExecutableDirectory() + "/res/img/" + iconFile; } - if (util::LoadTextureFromFile(logoPath.c_str(), &logo_tex_, &logo_w_, &logo_h_)) { + // Only attempt the disk read when the file is actually present (dev build / theme drop-in). + // The portable single-file build has no res/img/ beside it, so skip straight to the + // embedded copy instead of logging a spurious "failed to read". + std::error_code logoEc; + if (std::filesystem::exists(logoPath, logoEc) && + util::LoadTextureFromFile(logoPath.c_str(), &logo_tex_, &logo_w_, &logo_h_)) { DEBUG_LOGF("Loaded header logo from %s (%dx%d)\n", logoPath.c_str(), logo_w_, logo_h_); } else { // Try embedded data fallback — use actual filename from path @@ -1251,7 +1256,9 @@ void App::render() std::string coinFile = (cit != coinElem.extraColors.end() && !cit->second.empty()) ? cit->second : "logos/logo_dragonx_128.png"; std::string coinPath = util::getExecutableDirectory() + "/res/img/" + coinFile; - if (util::LoadTextureFromFile(coinPath.c_str(), &coin_logo_tex_, &coin_logo_w_, &coin_logo_h_)) { + std::error_code coinEc; + if (std::filesystem::exists(coinPath, coinEc) && + util::LoadTextureFromFile(coinPath.c_str(), &coin_logo_tex_, &coin_logo_w_, &coin_logo_h_)) { DEBUG_LOGF("Loaded coin logo from %s (%dx%d)\n", coinPath.c_str(), coin_logo_w_, coin_logo_h_); } else { // Try embedded resource fallback (Windows single-file distribution)