aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mokoeightball/mokoeightball/fixpath.patch
blob: 77485149e37ddca70478d0d401ffbff7183a0382 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
Index: ./src/eightball.py
===================================================================
--- ./src/eightball.py	(revision 45)
+++ ./src/eightball.py	(working copy)
@@ -47,12 +47,6 @@
 	shakeTimer = None
 
 	def __init__( self, size ):
-		# Check if we can use accelerated rendering
-		if ecore.evas.engine_type_supported_get("software_x11_16"):
-			self.engine = ecore.evas.SoftwareX11_16
-   		else:
-			print "warning: x11-16 is not supported, fallback to x11"
-			self.engine = ecore.evas.SoftwareX11
 
 		self.size = size
 		
@@ -63,7 +57,12 @@
 		self.accel.addListener( "shake", self.onShake )		
 
 		# Initialize the renderer and set all initial properties
-		self.ee = self.engine( w = size[0], h = size[1] )
+		try:
+			self.engine = ecore.evas.SoftwareX11_16
+			self.ee = self.engine( w = size[0], h = size[1] )
+   		except e:
+			self.engine = ecore.evas.SoftwareX11
+			self.ee = self.engine( w = size[0], h = size[1] )
 		self.ee.title = "Moko Eightball"
 		self.ee.name_class = ( "MOKO_EIGHTBALL", "MOKO_EIGHTBALL" )
 #		self.ee.fullscreen = True
Index: ./src/Accelerometer/__init__.py
===================================================================
--- ./src/Accelerometer/__init__.py	(revision 45)
+++ ./src/Accelerometer/__init__.py	(working copy)
@@ -30,7 +30,7 @@
 
 class EventManager(object):
 	movementTolerance = 30
-	shakeTolerance    = 2100
+	shakeTolerance    = 100
 
 	listeners = dict( 
 		shake = [],
@@ -82,15 +82,15 @@
 					# Inform all listeners
 					self.informListeners()
 					break
-				if ( type == 2 and code == 0 ):
+				if ( type == 3 and code == 0 ):
 					# Update x
 					x = value
 					continue
-				if ( type == 2 and code == 1 ):
+				if ( type == 3 and code == 1 ):
 					# Update y
 					y = value
 					continue
-				if ( type == 2 and code == 2 ):
+				if ( type == 3 and code == 2 ):
 					# Update z
 					z = value
 					continue