mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-08 06:00:08 +01:00
Display (Windows): adds VRR status detection support
This commit is contained in:
@@ -45,6 +45,7 @@ FFDisplayResult* ffdsAppendDisplay(
|
||||
display->manufactureYear = 0;
|
||||
display->manufactureWeek = 0;
|
||||
display->serial = 0;
|
||||
display->vrrStatus = FF_DISPLAY_VRR_STATUS_UNKNOWN;
|
||||
|
||||
return display;
|
||||
}
|
||||
|
||||
@@ -60,6 +60,13 @@ typedef enum __attribute__((__packed__)) FFDisplayHdrStatus
|
||||
FF_DISPLAY_HDR_STATUS_ENABLED,
|
||||
} FFDisplayHdrStatus;
|
||||
|
||||
typedef enum __attribute__((__packed__)) FFDisplayVrrStatus
|
||||
{
|
||||
FF_DISPLAY_VRR_STATUS_UNKNOWN,
|
||||
FF_DISPLAY_VRR_STATUS_DISABLED,
|
||||
FF_DISPLAY_VRR_STATUS_ENABLED,
|
||||
} FFDisplayVrrStatus;
|
||||
|
||||
typedef struct FFDisplayResult
|
||||
{
|
||||
uint32_t width; // in px
|
||||
@@ -83,6 +90,7 @@ typedef struct FFDisplayResult
|
||||
uint16_t manufactureYear;
|
||||
uint16_t manufactureWeek;
|
||||
uint32_t serial;
|
||||
FFDisplayVrrStatus vrrStatus;
|
||||
} FFDisplayResult;
|
||||
|
||||
typedef struct FFDisplayServerResult
|
||||
|
||||
@@ -229,6 +229,7 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
}
|
||||
if (edidLength > 0)
|
||||
ffEdidGetSerialAndManufactureDate(edidData, &display->serial, &display->manufactureYear, &display->manufactureWeek);
|
||||
display->vrrStatus = path->flags & DISPLAYCONFIG_PATH_BOOST_REFRESH_RATE ? FF_DISPLAY_VRR_STATUS_ENABLED : FF_DISPLAY_VRR_STATUS_DISABLED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user