From 392635547c08488b196712dde97f843ea18d982c Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:43:34 +0300
Subject: Disabling QtSingleApplication on Haiku


diff --git a/src/qtsingleapplication/qtsingleapplication.cpp b/src/qtsingleapplication/qtsingleapplication.cpp
index d0fb15d..fe60eb8 100644
--- a/src/qtsingleapplication/qtsingleapplication.cpp
+++ b/src/qtsingleapplication/qtsingleapplication.cpp
@@ -239,7 +239,11 @@ QtSingleApplication::QtSingleApplication(Display* dpy, const QString &appId, int
 
 bool QtSingleApplication::isRunning()
 {
+#ifdef Q_OS_HAIKU
+    return false;
+#else
     return peer->isClient();
+#endif
 }
 
 
@@ -258,7 +262,11 @@ bool QtSingleApplication::isRunning()
 */
 bool QtSingleApplication::sendMessage(const QString &message, int timeout)
 {
-    return peer->sendMessage(message, timeout);
+#ifdef Q_OS_HAIKU
+    return false;
+#else
+     return peer->sendMessage(message, timeout);
+#endif
 }
 
 
-- 
2.2.2


From 36b9c3025ed2bfdac49ff18deae802ad6c9a1ac0 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:52:48 +0300
Subject: Make haiku audio and video modules default on Haiku


diff --git a/src/prefgeneral.cpp b/src/prefgeneral.cpp
index f6f798d..c4e7608 100644
--- a/src/prefgeneral.cpp
+++ b/src/prefgeneral.cpp
@@ -175,9 +175,13 @@ void PrefGeneral::setData(Preferences * pref) {
 #ifdef Q_OS_OS2
 		vo = "kva";
 #else
+#ifdef Q_OS_HAIKU
+		vo = "haiku";
+#else
 		vo = "xv,";
 #endif
 #endif
+#endif
 	}
 	setVO( vo );
 
@@ -192,6 +196,11 @@ void PrefGeneral::setData(Preferences * pref) {
 		}
 	}
 #endif
+#ifdef Q_OS_HAIKU
+    if (ao.isEmpty()) {
+		ao = "haiku";
+	}
+#endif
 
 	setAO( ao );
 
@@ -948,9 +957,13 @@ void PrefGeneral::createHelp() {
 #ifdef Q_OS_OS2
 		  .arg("<b><i>kva</i></b>")
 #else
+#ifdef Q_OS_HAIKU
+		  .arg("<b><i>haiku</i></b>")
+#else
 		  .arg("<b><i>xv</i></b>")
 #endif
 #endif
+#endif
 		);
 
 #if !defined(Q_OS_WIN) && !defined(Q_OS_OS2)
-- 
2.2.2


From 9d78357b5855b50d61ab4f17efeb7b0abe920768 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 5 Jun 2015 17:54:14 +0300
Subject: Correctly identify Haiku instead of Other OS


diff --git a/src/smplayer.cpp b/src/smplayer.cpp
index 62c0a08..bccad3a 100644
--- a/src/smplayer.cpp
+++ b/src/smplayer.cpp
@@ -540,10 +540,14 @@ void SMPlayer::showInfo() {
 #ifdef Q_OS_OS2
            .arg("eCS (OS/2)")
 #else
+#ifdef Q_OS_HAIKU
+           .arg("Haiku")
+#else
 		   .arg("Other OS")
 #endif
 #endif
 #endif
+#endif
            ;
 
 	printf("%s\n", s.toLocal8Bit().data() );
-- 
2.2.2

