mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 10:22:12 +02:00
fix build in ancient MacOS (#1334)
This commit is contained in:
@@ -9,9 +9,9 @@
|
||||
#include <CoreGraphics/CGDirectDisplay.h>
|
||||
#include <CoreVideo/CVDisplayLink.h>
|
||||
|
||||
#ifdef MAC_OS_X_VERSION_10_15
|
||||
extern Boolean CoreDisplay_Display_SupportsHDRMode(CGDirectDisplayID display) __attribute__((weak_import));
|
||||
extern Boolean CoreDisplay_Display_IsHDRModeEnabled(CGDirectDisplayID display) __attribute__((weak_import));
|
||||
#ifdef MAC_OS_X_VERSION_10_15
|
||||
extern CFDictionaryRef CoreDisplay_DisplayCreateInfoDictionary(CGDirectDisplayID display) __attribute__((weak_import));
|
||||
#else
|
||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||
@@ -111,6 +111,7 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
if (display->type == FF_DISPLAY_TYPE_BUILTIN)
|
||||
display->hdrStatus = CFDictionaryContainsKey(displayInfo, CFSTR("ReferencePeakHDRLuminance"))
|
||||
? FF_DISPLAY_HDR_STATUS_SUPPORTED : FF_DISPLAY_HDR_STATUS_UNSUPPORTED;
|
||||
#ifdef MAC_OS_X_VERSION_10_15
|
||||
else if (CoreDisplay_Display_SupportsHDRMode)
|
||||
{
|
||||
if (CoreDisplay_Display_SupportsHDRMode(screen))
|
||||
@@ -122,6 +123,7 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
else
|
||||
display->hdrStatus = FF_DISPLAY_HDR_STATUS_UNSUPPORTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
display->serial = CGDisplaySerialNumber(screen);
|
||||
int value;
|
||||
|
||||
Reference in New Issue
Block a user