master ohmu/fastfetch-openbsd / src / modules / gpu / option.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "common/option.h"
 4#include "common/percent.h"
 5
 6typedef enum FFGPUType: uint8_t {
 7    FF_GPU_TYPE_NONE,    // Indicates no specific GPU type. Useful as a hide filter only.
 8    FF_GPU_TYPE_UNKNOWN, // Indicates an unknown or unrecognized GPU type.
 9    FF_GPU_TYPE_INTEGRATED,
10    FF_GPU_TYPE_DISCRETE,
11} FFGPUType;
12
13typedef enum FFGPUDetectionMethod: uint8_t {
14    FF_GPU_DETECTION_METHOD_AUTO,
15    FF_GPU_DETECTION_METHOD_PCI,
16    FF_GPU_DETECTION_METHOD_VULKAN,
17    FF_GPU_DETECTION_METHOD_OPENCL,
18    FF_GPU_DETECTION_METHOD_EGL_EXT,
19    FF_GPU_DETECTION_METHOD_OPENGL,
20} FFGPUDetectionMethod;
21
22typedef struct FFGPUOptions {
23    FFModuleArgs moduleArgs;
24
25    FFGPUType hideType;
26    FFGPUDetectionMethod detectionMethod;
27    bool temp;
28    bool driverSpecific;
29    FFColorRangeConfig tempConfig;
30    FFPercentageModuleConfig percent;
31} FFGPUOptions;
32
33static_assert(sizeof(FFGPUOptions) <= FF_OPTION_MAX_SIZE, "FFGPUOptions size exceeds maximum allowed size");