Global: pack all enums and make flag enums unsigned

This commit is contained in:
李通洲
2024-11-14 10:04:57 +08:00
parent e821a99873
commit 97e1b987dd
54 changed files with 100 additions and 73 deletions
+1 -1
View File
@@ -439,7 +439,7 @@ void ffInitGPUOptions(FFGPUOptions* options)
options->temp = false;
options->hideType = FF_GPU_TYPE_UNKNOWN;
options->tempConfig = (FFColorRangeConfig) { 60, 80 };
options->percent = (FFColorRangeConfig) { 50, 80 };
options->percent = (FFPercentageModuleConfig) { 50, 80 };
}
void ffDestroyGPUOptions(FFGPUOptions* options)
+3 -3
View File
@@ -5,14 +5,14 @@
#include "common/option.h"
#include "common/percent.h"
typedef enum FFGPUType
typedef enum __attribute__((__packed__)) FFGPUType
{
FF_GPU_TYPE_UNKNOWN,
FF_GPU_TYPE_INTEGRATED,
FF_GPU_TYPE_DISCRETE,
} FFGPUType;
typedef enum FFGPUDetectionMethod
typedef enum __attribute__((__packed__)) FFGPUDetectionMethod
{
FF_GPU_DETECTION_METHOD_AUTO,
FF_GPU_DETECTION_METHOD_PCI,
@@ -32,5 +32,5 @@ typedef struct FFGPUOptions
bool driverSpecific;
bool forceMethod;
FFColorRangeConfig tempConfig;
FFColorRangeConfig percent;
FFPercentageModuleConfig percent;
} FFGPUOptions;