mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-19 10:10:06 +02:00
84 lines
2.5 KiB
Plaintext
84 lines
2.5 KiB
Plaintext
From 5ce0bf7c0eb56069a7113d553a26f38613014076 Mon Sep 17 00:00:00 2001
|
|
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
|
Date: Tue, 2 Nov 2021 20:36:30 +1000
|
|
Subject: Fix for Haiku
|
|
|
|
|
|
diff --git a/app/dialog.cpp b/app/dialog.cpp
|
|
index be1468c..37955e6 100644
|
|
--- a/app/dialog.cpp
|
|
+++ b/app/dialog.cpp
|
|
@@ -38,7 +38,7 @@ void Dialog::setMessage(const QString &_message, bool *_acceptFlag) /*** Set p
|
|
QFont font;
|
|
font.setPointSize(10);
|
|
ui_dialog->label_title->setFont(font);
|
|
-#ifdef Q_OS_WIN
|
|
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
|
|
QSound::play("./cine-encoder.wav");
|
|
#else
|
|
QSound::play("/usr/share/sounds/cine-encoder.wav");
|
|
diff --git a/app/main.cpp b/app/main.cpp
|
|
index 2b13819..5235fae 100644
|
|
--- a/app/main.cpp
|
|
+++ b/app/main.cpp
|
|
@@ -40,6 +40,7 @@ int main(int argc, char *argv[])
|
|
delete _settings;
|
|
|
|
/********************* Set Font ******************************/
|
|
+#ifndef Q_OS_HAIKU
|
|
QFont font = app.font();
|
|
if (_fontSize == 0) {
|
|
_fontSize = 8;
|
|
@@ -49,7 +50,7 @@ int main(int argc, char *argv[])
|
|
}
|
|
font.setPointSize(_fontSize);
|
|
app.setFont(font);
|
|
-
|
|
+#endif
|
|
/******************* Set Translate ****************************/
|
|
QString language = "";
|
|
QLocale locale = QLocale::system();
|
|
diff --git a/app/mainwindow.cpp b/app/mainwindow.cpp
|
|
index 7c63130..129ea41 100644
|
|
--- a/app/mainwindow.cpp
|
|
+++ b/app/mainwindow.cpp
|
|
@@ -41,6 +41,13 @@
|
|
using namespace MediaInfoDLL;
|
|
#endif
|
|
|
|
+#ifdef Q_OS_HAIKU
|
|
+ #ifndef UNICODE
|
|
+ #define UNICODE
|
|
+ #endif
|
|
+ #include <MediaInfo/MediaInfo.h>
|
|
+ using namespace MediaInfoLib;
|
|
+#endif
|
|
|
|
|
|
Widget::Widget(QWidget *parent): QWidget(parent), ui(new Ui::Widget)
|
|
@@ -2107,6 +2114,8 @@ void Widget::make_preset() /*** Make preset ***/
|
|
//QString intelQSV_VP9_preset = "-c:v vp9_qsv ";
|
|
#if defined (Q_OS_WIN64)
|
|
QString intelQSVhwaccel = " -hwaccel dxva2 -hwaccel_output_format dxva2_vld";
|
|
+#elif defined (Q_OS_HAIKU)
|
|
+ QString intelQSVhwaccel = " ";
|
|
#elif defined (Q_OS_UNIX)
|
|
QString intelQSVhwaccel = " -hwaccel vaapi -hwaccel_output_format vaapi";
|
|
#endif
|
|
diff --git a/app/taskcomplete.cpp b/app/taskcomplete.cpp
|
|
index 11668c4..b56cc49 100644
|
|
--- a/app/taskcomplete.cpp
|
|
+++ b/app/taskcomplete.cpp
|
|
@@ -47,7 +47,7 @@ void Taskcomplete::setMessage(const QString &_message, const bool &_timer_mode)
|
|
}
|
|
else
|
|
{
|
|
-#ifdef Q_OS_WIN
|
|
+#if defined(Q_OS_WIN) || defined(Q_OS_HAIKU)
|
|
QSound::play("./cine-encoder.wav");
|
|
#else
|
|
QSound::play("/usr/share/sounds/cine-encoder.wav");
|
|
--
|
|
2.30.2
|
|
|