mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-02 11:23:41 +01:00
Display: remove detection of WCG enabled
This commit is contained in:
@@ -34,7 +34,6 @@ FFDisplayResult* ffdsAppendDisplay(
|
||||
|
||||
display->bitDepth = 0;
|
||||
display->hdrEnabled = false;
|
||||
display->wcgEnabled = false;
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ typedef struct FFDisplayResult
|
||||
bool primary;
|
||||
uint8_t bitDepth;
|
||||
bool hdrEnabled;
|
||||
bool wcgEnabled;
|
||||
} FFDisplayResult;
|
||||
|
||||
typedef struct FFDisplayServerResult
|
||||
|
||||
@@ -178,7 +178,6 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
if (DisplayConfigGetDeviceInfo(&advColorInfo.header) == ERROR_SUCCESS)
|
||||
{
|
||||
display->hdrEnabled = !!advColorInfo.advancedColorEnabled;
|
||||
display->wcgEnabled = !!advColorInfo.wideColorEnforced;
|
||||
display->bitDepth = (uint8_t) advColorInfo.bitsPerColorChannel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,12 +119,6 @@ static void waylandKdeHdrListener(void *data, FF_MAYBE_UNUSED struct kde_output_
|
||||
display->hdrEnabled = !!hdr_enabled;
|
||||
}
|
||||
|
||||
static void waylandKdeWcgListener(void *data, FF_MAYBE_UNUSED struct kde_output_device_v2 *kde_output_device_v2, uint32_t wcg_enabled)
|
||||
{
|
||||
WaylandDisplay* display = data;
|
||||
display->wcgEnabled = !!wcg_enabled;
|
||||
}
|
||||
|
||||
static struct kde_output_device_v2_listener outputListener = {
|
||||
.geometry = waylandKdeGeometryListener,
|
||||
.current_mode = waylandKdeCurrentModeListener,
|
||||
@@ -143,7 +137,7 @@ static struct kde_output_device_v2_listener outputListener = {
|
||||
.name = waylandKdeNameListener,
|
||||
.high_dynamic_range = waylandKdeHdrListener,
|
||||
.sdr_brightness = (void*) stubListener,
|
||||
.wide_color_gamut = waylandKdeWcgListener,
|
||||
.wide_color_gamut = (void*) stubListener,
|
||||
.auto_rotate_policy = (void*) stubListener,
|
||||
.icc_profile_path = (void*) stubListener,
|
||||
.brightness_metadata = (void*) stubListener,
|
||||
@@ -202,7 +196,6 @@ void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry,
|
||||
if (item)
|
||||
{
|
||||
item->hdrEnabled = display.hdrEnabled;
|
||||
item->wcgEnabled = display.wcgEnabled;
|
||||
}
|
||||
|
||||
ffStrbufDestroy(&display.description);
|
||||
|
||||
@@ -47,7 +47,6 @@ typedef struct WaylandDisplay
|
||||
FFstrbuf edidName;
|
||||
uint64_t id;
|
||||
bool hdrEnabled;
|
||||
bool wcgEnabled;
|
||||
void* internal;
|
||||
} WaylandDisplay;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define FF_DISPLAY_NUM_FORMAT_ARGS 16
|
||||
#define FF_DISPLAY_NUM_FORMAT_ARGS 15
|
||||
|
||||
static int sortByNameAsc(FFDisplayResult* a, FFDisplayResult* b)
|
||||
{
|
||||
@@ -156,7 +156,6 @@ void ffPrintDisplay(FFDisplayOptions* options)
|
||||
{FF_FORMAT_ARG_TYPE_DOUBLE, &ppi, "ppi"},
|
||||
{FF_FORMAT_ARG_TYPE_UINT8, &result->bitDepth, "bit-depth"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &result->hdrEnabled, "hdr-enabled"},
|
||||
{FF_FORMAT_ARG_TYPE_BOOL, &result->wcgEnabled, "wcg-enabled"},
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -326,7 +325,6 @@ void ffGenerateDisplayJsonResult(FF_MAYBE_UNUSED FFDisplayOptions* options, yyjs
|
||||
yyjson_mut_obj_add_uint(doc, obj, "rotation", item->rotation);
|
||||
yyjson_mut_obj_add_uint(doc, obj, "bitDepth", item->bitDepth);
|
||||
yyjson_mut_obj_add_bool(doc, obj, "hdrEnabled", item->hdrEnabled);
|
||||
yyjson_mut_obj_add_bool(doc, obj, "wcgEnabled", item->wcgEnabled);
|
||||
|
||||
switch (item->type)
|
||||
{
|
||||
@@ -361,7 +359,6 @@ void ffPrintDisplayHelpFormat(void)
|
||||
"Pixels per inch (PPI) - ppi",
|
||||
"Bits per color channel - bit-depth",
|
||||
"True if high dynamic range (HDR) is enabled - hdr-enabled",
|
||||
"True if wide color gamut (WCG) is enabled - wcg-enabled",
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user