mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Merge
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <CoreGraphics/CGDirectDisplay.h>
|
||||
#include <CoreVideo/CVDisplayLink.h>
|
||||
|
||||
static void detectDisplays(FFDisplayServerResult* ds)
|
||||
{
|
||||
@@ -20,10 +21,25 @@ static void detectDisplays(FFDisplayServerResult* ds)
|
||||
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(screen);
|
||||
if(mode)
|
||||
{
|
||||
//https://github.com/glfw/glfw/commit/aab08712dd8142b642e2042e7b7ba563acd07a45
|
||||
double refreshRate = CGDisplayModeGetRefreshRate(mode);
|
||||
|
||||
if (refreshRate == 0)
|
||||
{
|
||||
CVDisplayLinkRef link;
|
||||
if(CVDisplayLinkCreateWithCGDisplay(screen, &link) == kCVReturnSuccess)
|
||||
{
|
||||
const CVTime time = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(link);
|
||||
if (!(time.flags & kCVTimeIsIndefinite))
|
||||
refreshRate = time.timeScale / (double) time.timeValue + 0.5; //59.97...
|
||||
CVDisplayLinkRelease(link);
|
||||
}
|
||||
}
|
||||
|
||||
ffdsAppendDisplay(ds,
|
||||
(uint32_t)CGDisplayModeGetPixelWidth(mode),
|
||||
(uint32_t)CGDisplayModeGetPixelHeight(mode),
|
||||
(uint32_t)CGDisplayModeGetRefreshRate(mode),
|
||||
(uint32_t)refreshRate,
|
||||
(uint32_t)CGDisplayModeGetWidth(mode),
|
||||
(uint32_t)CGDisplayModeGetHeight(mode)
|
||||
);
|
||||
|
||||
+3
-1
@@ -888,7 +888,9 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
#define FF_ARCHITECTURE "powerpc"
|
||||
#elif defined(__riscv__) || defined(__riscv)
|
||||
#define FF_ARCHITECTURE "riscv"
|
||||
#elif
|
||||
#elif defined(__s390x__)
|
||||
#define FF_ARCHITECTURE "s390x"
|
||||
#else
|
||||
#define FF_ARCHITECTURE "unknown"
|
||||
#endif
|
||||
|
||||
|
||||
+2
-2
@@ -34,9 +34,9 @@ void ffPrintWifi(FFinstance* instance)
|
||||
{
|
||||
ffStrbufWriteTo(&item->conn.ssid, stdout);
|
||||
if(item->conn.protocol.length)
|
||||
printf("- %s", item->conn.protocol.chars);
|
||||
printf(" - %s", item->conn.protocol.chars);
|
||||
if(item->conn.security.length)
|
||||
printf("- %s", item->conn.security.chars);
|
||||
printf(" - %s", item->conn.security.chars);
|
||||
putchar('\n');
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user