mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:14:37 +02:00
Global: cleanups FF_HAVE_DRM macro
This commit is contained in:
@@ -214,9 +214,6 @@ void ffListFeatures(void) {
|
||||
#if FF_HAVE_DRM
|
||||
"drm\n"
|
||||
#endif
|
||||
#if FF_HAVE_DRM_AMDGPU
|
||||
"drm_amdgpu\n"
|
||||
#endif
|
||||
#if FF_HAVE_GIO
|
||||
"gio\n"
|
||||
#endif
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "codec.h"
|
||||
|
||||
#if (FF_HAVE_DRM && FF_HAVE_VA) || FF_HAVE_VDPAU
|
||||
#if FF_HAVE_VA || FF_HAVE_VDPAU
|
||||
|
||||
#include "common/library.h"
|
||||
#include "common/mallocHelper.h"
|
||||
@@ -388,7 +388,7 @@ static const char* ffDetectCodecByVdpau(FFCodecOptions* options, FFlist* result)
|
||||
const char* ffDetectCodecNative(FFCodecOptions* options, FFlist* result /* list of FFCodecResult */) {
|
||||
FF_SUPPRESS_IO();
|
||||
|
||||
#if FF_HAVE_DRM && FF_HAVE_VA
|
||||
#if FF_HAVE_VA
|
||||
if (ffDetectCodecByVa(options, result) == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <nouveau_drm.h>
|
||||
#include <amdgpu_drm.h>
|
||||
#else
|
||||
#define FF_HAVE_DRM 1
|
||||
#include <drm/drm.h>
|
||||
#include <drm/radeon_drm.h>
|
||||
#include <drm/nouveau_drm.h>
|
||||
|
||||
@@ -72,7 +72,6 @@ FF_A_UNUSED static const char* drmFindRenderFromCard(const char* drmCardKey, FFs
|
||||
}
|
||||
|
||||
static const char* drmDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult* gpu, const char* drmKey, FFstrbuf* buffer) {
|
||||
#if FF_HAVE_DRM
|
||||
const char* error = drmFindRenderFromCard(drmKey, buffer);
|
||||
if (error) {
|
||||
return error;
|
||||
@@ -80,17 +79,8 @@ static const char* drmDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult
|
||||
if (ffStrbufEqualS(&gpu->driver, "radeon")) {
|
||||
return ffDrmDetectRadeon(options, gpu, buffer->chars);
|
||||
} else {
|
||||
#if FF_HAVE_DRM_AMDGPU
|
||||
return ffDrmDetectAmdgpu(options, gpu, buffer->chars);
|
||||
#else
|
||||
FF_UNUSED(options, gpu, drmKey, buffer);
|
||||
return "Fastfetch is not compiled with libdrm_amdgpu support";
|
||||
#endif
|
||||
}
|
||||
#else
|
||||
FF_UNUSED(options, gpu, drmKey, buffer);
|
||||
return "Fastfetch is not compiled with drm support";
|
||||
#endif
|
||||
}
|
||||
|
||||
static void pciDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult* gpu, FFstrbuf* pciDir, FFstrbuf* buffer) {
|
||||
|
||||
Reference in New Issue
Block a user