From a89a4c5beb1e4e1c8286e2038416bb7eeb5fd35e Mon Sep 17 00:00:00 2001
From: leonarski_f
Date: Sat, 20 Jun 2026 16:08:13 +0200
Subject: [PATCH] jfjoch_viewer: Show detected GPUs in the about box
---
viewer/JFJochViewerMenu.cpp | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/viewer/JFJochViewerMenu.cpp b/viewer/JFJochViewerMenu.cpp
index 563aa54a..fa39e87a 100644
--- a/viewer/JFJochViewerMenu.cpp
+++ b/viewer/JFJochViewerMenu.cpp
@@ -15,6 +15,7 @@
#include "JFJochViewerWindow.h"
#include "../common/GitInfo.h"
+#include "../common/CUDAWrapper.h"
JFJochViewerMenu::JFJochViewerMenu(QWidget *parent) : QMenuBar(parent) {
// Create "File" menu
@@ -85,15 +86,21 @@ void JFJochViewerMenu::aboutSelected() {
QMessageBox aboutBox(this);
aboutBox.setWindowTitle("About");
- // Set detailed text with proper spacing and structure
- aboutBox.setText(
- "Jungfraujoch Image Viewer
" // Use HTML for improved style
+ QString about_text = "Jungfraujoch Image Viewer
" // Use HTML for improved style
"Version: " + version + "
"
"Copyright: 2019-2025 Paul Scherrer Institute
"
"Author: Filip Leonarski <filip.leonarski@psi.ch>
"
"Links: Documentation, "
- "Repository
"
- );
+ "Repository
";
+
+#ifdef JFJOCH_USE_CUDA
+ about_text += QString("Compiled with CUDA support. %1 GPU(s) detected
")
+ .arg(QString::number(get_gpu_count()));
+#else
+ about_text += "Note: CUDA is not available on this system.
";
+#endif
+ // Set detailed text with proper spacing and structure
+ aboutBox.setText(about_text);
// Optional: Add a larger informative text, if needed
aboutBox.setInformativeText(