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