mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 758093 - Fix b2g debug build. r=fabrice
This commit is contained in:
parent
c9fd386a7e
commit
f6b33f82f2
@ -10,6 +10,7 @@
|
||||
#include "nsIScreen.h"
|
||||
#include "nsIScreenManager.h"
|
||||
#include "OrientationObserver.h"
|
||||
#include "mozilla/HalSensor.h"
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace dom;
|
||||
@ -175,7 +176,7 @@ OrientationObserver::Notify(const hal::SensorData& aSensorData)
|
||||
{
|
||||
// Sensor will call us on the main thread.
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aSensorData.sensor() == SensorType::SENSOR_ORIENTATION);
|
||||
MOZ_ASSERT(aSensorData.sensor() == hal::SensorType::SENSOR_ORIENTATION);
|
||||
|
||||
InfallibleTArray<float> values = aSensorData.values();
|
||||
// Azimuth (values[0]): the device's horizontal orientation
|
||||
@ -237,7 +238,7 @@ OrientationObserver::Notify(const hal::SensorData& aSensorData)
|
||||
void
|
||||
OrientationObserver::EnableAutoOrientation()
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread() && !AutoOrientationEnabled());
|
||||
MOZ_ASSERT(NS_IsMainThread() && !mAutoOrientationEnabled);
|
||||
|
||||
hal::RegisterSensorObserver(hal::SENSOR_ORIENTATION, this);
|
||||
mAutoOrientationEnabled = true;
|
||||
@ -258,8 +259,8 @@ OrientationObserver::DisableAutoOrientation()
|
||||
bool
|
||||
OrientationObserver::LockScreenOrientation(ScreenOrientation aOrientation)
|
||||
{
|
||||
MOZ_ASSERT(eScreenOrientation_None < aOrientations &&
|
||||
aOrientations < eScreenOrientation_EndGuard);
|
||||
MOZ_ASSERT(eScreenOrientation_None < aOrientation &&
|
||||
aOrientation < eScreenOrientation_EndGuard);
|
||||
|
||||
// Enable/disable the observer depending on 1. multiple orientations
|
||||
// allowed, and 2. observer enabled.
|
||||
|
Loading…
Reference in New Issue
Block a user