From fac628a1b40542bc890e76c461fb5c88f0e2549e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pali=20Roh=C3=A1r?= <pali.rohar@gmail.com>
Date: Fri, 12 Nov 2010 22:42:09 +0100
Subject: [PATCH] Decrease scrolling speed on Maemo, it is too high

---
 src/stratagus/mainloop.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/stratagus/mainloop.cpp b/src/stratagus/mainloop.cpp
index 6dc1585e5..c0e677d32 100644
--- a/src/stratagus/mainloop.cpp
+++ b/src/stratagus/mainloop.cpp
@@ -169,6 +169,17 @@ void DoScrollArea(int state, bool fast)
 		stepy = 0;
 	}
 
+#ifdef USE_MAEMO
+	// Decrease scrolling speed on Maemo, it is too high
+	if (state & ScrollUp || state & ScrollDown) {
+		stepy /= 4;
+	}
+
+	if (state & ScrollLeft || state & ScrollRight) {
+		stepx /= 4;
+	}
+#endif
+
 	if (state & ScrollUp) {
 		stepy = -stepy;
 	}