Skip to content

Commit

Permalink
Merge pull request #403 from LinusDierheimer/dev
Browse files Browse the repository at this point in the history
Release 1.9.1
  • Loading branch information
LinusDierheimer authored Jan 24, 2023
2 parents fbbfc7f + d7b84be commit 4b253aa
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# 1.9.1

Bugfixes:

* Fix builds on s390x (@jonathanspw, #402)
* Fix zero refresh rate on some monitors (macOS)
* Fix default formatting of Wifi module

# 1.9.0

Notable Changes:
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 1.9.0
VERSION 1.9.1
LANGUAGES C
DESCRIPTION "Fast system information tool"
HOMEPAGE_URL "https://github.com/LinusDierheimer/fastfetch"
Expand Down Expand Up @@ -666,6 +666,7 @@ if(APPLE)
PRIVATE "-framework OpenCL"
PRIVATE "-framework Cocoa"
PRIVATE "-framework CoreWLAN"
PRIVATE "-framework CoreVideo"
PRIVATE "-weak_framework MediaRemote -F /System/Library/PrivateFrameworks"
PRIVATE "-weak_framework DisplayServices -F /System/Library/PrivateFrameworks"
)
Expand Down
18 changes: 17 additions & 1 deletion src/detection/displayserver/displayserver_apple.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <string.h>
#include <assert.h>
#include <CoreGraphics/CGDirectDisplay.h>
#include <CoreVideo/CVDisplayLink.h>

static void detectDisplays(FFDisplayServerResult* ds)
{
Expand All @@ -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)
);
Expand Down
4 changes: 3 additions & 1 deletion src/fastfetch.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,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

Expand Down
4 changes: 2 additions & 2 deletions src/modules/wifi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4b253aa

Please sign in to comment.