Bug 648508 - Remove the Windows CE code for accelerometer support (follow up); r=jst
authorEd Morley <bmo@edmorley.co.uk>
Fri, 08 Apr 2011 13:33:53 +0100
changeset 67715 6ff088b689a3261ffe4810ff03e98ae7eda4cbb0
parent 67714 06be56cbd4f067a48e7f1eb14b5610d5e36e4366
child 67716 5e7eef0ccdc6ac2d4a45aa86cc41cf5d0243d2fe
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjst
bugs648508
milestone2.2a1pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 648508 - Remove the Windows CE code for accelerometer support (follow up); r=jst
dom/system/windows/nsAccelerometerSystem.cpp
--- a/dom/system/windows/nsAccelerometerSystem.cpp
+++ b/dom/system/windows/nsAccelerometerSystem.cpp
@@ -34,18 +34,16 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsAccelerometerSystem.h"
 #include "nsIServiceManager.h"
 #include "windows.h"
 
-#if !defined(WINCE) && !defined(WINCE_WINDOWS_MOBILE) // normal windows.
-
 ////////////////////////////
 // ThinkPad
 ////////////////////////////
 
 typedef struct {
   int status; // Current internal state
   unsigned short x; // raw value
   unsigned short y; // raw value
@@ -116,18 +114,16 @@ ThinkPadSensor::GetValues(double *x, dou
   // accelData.x and accelData.y is the acceleration measured from the accelerometer.
   // x and y is switched from what we use, and the accelerometer does not support z axis.
   // Balance point (526, 528) and 90 degree tilt (144) determined experimentally.
   *x = ((double)(accelData.y - 526)) / 144;
   *y = ((double)(accelData.x - 528)) / 144;
   *z = 1.0;
 }
 
-#endif
-
 nsAccelerometerSystem::nsAccelerometerSystem(){}
 nsAccelerometerSystem::~nsAccelerometerSystem(){}
 
 void
 nsAccelerometerSystem::UpdateHandler(nsITimer *aTimer, void *aClosure)
 {
   nsAccelerometerSystem *self = reinterpret_cast<nsAccelerometerSystem *>(aClosure);
   if (!self || !self->mSensor) {
@@ -140,24 +136,20 @@ nsAccelerometerSystem::UpdateHandler(nsI
 }
 
 void nsAccelerometerSystem::Startup()
 {
   NS_ASSERTION(!mSensor, "mSensor should be null.  Startup called twice?");
 
   PRBool started = PR_FALSE;
 
-#if !defined(WINCE) && !defined(WINCE_WINDOWS_MOBILE) // normal windows.
-
   mSensor = new ThinkPadSensor();
   if (mSensor)
     started = mSensor->Startup();
 
-#endif
-
   if (!started)
     return;
 
   mUpdateTimer = do_CreateInstance("@mozilla.org/timer;1");
   if (mUpdateTimer)
     mUpdateTimer->InitWithFuncCallback(UpdateHandler,
                                        this,
                                        mUpdateInterval,