Skip to content

Commit 4b253aa

Browse files
Merge pull request #403 from LinusDierheimer/dev
Release 1.9.1
2 parents fbbfc7f + d7b84be commit 4b253aa

File tree

5 files changed

+32
-5
lines changed

5 files changed

+32
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 1.9.1
2+
3+
Bugfixes:
4+
5+
* Fix builds on s390x (@jonathanspw, #402)
6+
* Fix zero refresh rate on some monitors (macOS)
7+
* Fix default formatting of Wifi module
8+
19
# 1.9.0
210

311
Notable Changes:

CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 1.9.0
4+
VERSION 1.9.1
55
LANGUAGES C
66
DESCRIPTION "Fast system information tool"
77
HOMEPAGE_URL "https://github.com/LinusDierheimer/fastfetch"
@@ -666,6 +666,7 @@ if(APPLE)
666666
PRIVATE "-framework OpenCL"
667667
PRIVATE "-framework Cocoa"
668668
PRIVATE "-framework CoreWLAN"
669+
PRIVATE "-framework CoreVideo"
669670
PRIVATE "-weak_framework MediaRemote -F /System/Library/PrivateFrameworks"
670671
PRIVATE "-weak_framework DisplayServices -F /System/Library/PrivateFrameworks"
671672
)

src/detection/displayserver/displayserver_apple.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include <string.h>
77
#include <assert.h>
88
#include <CoreGraphics/CGDirectDisplay.h>
9+
#include <CoreVideo/CVDisplayLink.h>
910

1011
static void detectDisplays(FFDisplayServerResult* ds)
1112
{
@@ -20,10 +21,25 @@ static void detectDisplays(FFDisplayServerResult* ds)
2021
CGDisplayModeRef mode = CGDisplayCopyDisplayMode(screen);
2122
if(mode)
2223
{
24+
//https://github.com/glfw/glfw/commit/aab08712dd8142b642e2042e7b7ba563acd07a45
25+
double refreshRate = CGDisplayModeGetRefreshRate(mode);
26+
27+
if (refreshRate == 0)
28+
{
29+
CVDisplayLinkRef link;
30+
if(CVDisplayLinkCreateWithCGDisplay(screen, &link) == kCVReturnSuccess)
31+
{
32+
const CVTime time = CVDisplayLinkGetNominalOutputVideoRefreshPeriod(link);
33+
if (!(time.flags & kCVTimeIsIndefinite))
34+
refreshRate = time.timeScale / (double) time.timeValue + 0.5; //59.97...
35+
CVDisplayLinkRelease(link);
36+
}
37+
}
38+
2339
ffdsAppendDisplay(ds,
2440
(uint32_t)CGDisplayModeGetPixelWidth(mode),
2541
(uint32_t)CGDisplayModeGetPixelHeight(mode),
26-
(uint32_t)CGDisplayModeGetRefreshRate(mode),
42+
(uint32_t)refreshRate,
2743
(uint32_t)CGDisplayModeGetWidth(mode),
2844
(uint32_t)CGDisplayModeGetHeight(mode)
2945
);

src/fastfetch.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -879,7 +879,9 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
879879
#define FF_ARCHITECTURE "powerpc"
880880
#elif defined(__riscv__) || defined(__riscv)
881881
#define FF_ARCHITECTURE "riscv"
882-
#elif
882+
#elif defined(__s390x__)
883+
#define FF_ARCHITECTURE "s390x"
884+
#else
883885
#define FF_ARCHITECTURE "unknown"
884886
#endif
885887

src/modules/wifi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ void ffPrintWifi(FFinstance* instance)
3434
{
3535
ffStrbufWriteTo(&item->conn.ssid, stdout);
3636
if(item->conn.protocol.length)
37-
printf("- %s", item->conn.protocol.chars);
37+
printf(" - %s", item->conn.protocol.chars);
3838
if(item->conn.security.length)
39-
printf("- %s", item->conn.security.chars);
39+
printf(" - %s", item->conn.security.chars);
4040
putchar('\n');
4141
}
4242
else

0 commit comments

Comments
 (0)