From 348a87415c8694ec803279c2d7a87afa4fca1f51 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Wed, 22 Nov 2017 01:33:59 +0300
Subject: Link with libnetwork on Haiku


diff --git a/configure.ac b/configure.ac
index d8f9035..8067284 100644
--- a/configure.ac
+++ b/configure.ac
@@ -57,6 +57,12 @@ AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
       LIBS="-lexecinfo $LIBS"],
       [AC_MSG_RESULT([no])])
 
+AC_MSG_CHECKING([whether OS is Haiku])
+AS_IF([expr "$host_os" : ".*haiku.*" > /dev/null],
+      [AC_MSG_RESULT([yes])
+      LIBS="-lnetwork $LIBS"],
+      [AC_MSG_RESULT([no])])
+
 AC_MSG_CHECKING([whether OS is macOS])
 AS_IF([expr "$host_os" : ".*darwin.*" > /dev/null],
       [AC_MSG_RESULT([yes])
-- 
2.28.0


From e9b5592aa8e63d0eb3b5a0a05066cc0be03e960d Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Wed, 21 Oct 2020 08:39:36 +1000
Subject: Disable HighDPI on Haiku


diff --git a/src/app/main.cpp b/src/app/main.cpp
index bec7cdb..b8654b1 100644
--- a/src/app/main.cpp
+++ b/src/app/main.cpp
@@ -132,7 +132,7 @@ int main(int argc, char *argv[])
     // We must save it here because QApplication constructor may change it
     bool isOneArg = (argc == 2);
 
-#if !defined(DISABLE_GUI) && (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
+#if !defined(DISABLE_GUI) && (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) && !defined(Q_OS_HAIKU)
     // Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created
     if (qgetenv("QT_ENABLE_HIGHDPI_SCALING").isEmpty() && qgetenv("QT_AUTO_SCREEN_SCALE_FACTOR").isEmpty())
         Application::setAttribute(Qt::AA_EnableHighDpiScaling, true);
-- 
2.28.0

