summaryrefslogtreecommitdiff
path: root/src/wx
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-03-03 22:40:13 +0100
committerCarl Hetherington <cth@carlh.net>2025-03-08 00:12:07 +0100
commit0f2ed1b51af625767b9e0c41eb59651f2ceb1d88 (patch)
tree70d0a6d42312adc7b9c43018f78420beabc888e7 /src/wx
parent641f5f2f61b77d79cb1e8c737cda0766b1ee2de8 (diff)
Move get_gpu_names() to its own file.
Diffstat (limited to 'src/wx')
-rw-r--r--src/wx/grok/gpu_config_panel.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/src/wx/grok/gpu_config_panel.h b/src/wx/grok/gpu_config_panel.h
index 3f4d0312c..6b8a4f150 100644
--- a/src/wx/grok/gpu_config_panel.h
+++ b/src/wx/grok/gpu_config_panel.h
@@ -22,30 +22,10 @@
#pragma once
+#include "lib/grok/util.h"
#include <wx/filepicker.h>
-static std::vector<std::string> get_gpu_names(boost::filesystem::path binary, boost::filesystem::path filename)
-{
- // Execute the GPU listing program and redirect its output to a file
- if (std::system((binary.string() + " > " + filename.string()).c_str()) < 0) {
- return {};
- }
-
- std::vector<std::string> gpu_names;
- std::ifstream file(filename.c_str());
- if (file.is_open())
- {
- std::string line;
- while (std::getline(file, line))
- gpu_names.push_back(line);
- file.close();
- }
-
- return gpu_names;
-}
-
-
class GpuList : public wxPanel
{
public: