MCPcopy Create free account
hub / github.com/PolygonTek/BlueshiftEngine / SuspendSensors

Function SuspendSensors

Source/Player/AndroidMain.cpp:315–324  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313}
314
315static void SuspendSensors() {
316 // When our app loses focus, we stop monitoring the accelerometer.
317 // This is to avoid consuming battery while not being used.
318 if (accelerometerSensor) {
319 ASensorEventQueue_disableSensor(sensorEventQueue, accelerometerSensor);
320 }
321 if (gyroscopeSensor) {
322 ASensorEventQueue_disableSensor(sensorEventQueue, gyroscopeSensor);
323 }
324}
325
326static void WindowSizeChanged(int w, int h) {
327 currentWindowWidth = w;

Callers 1

HandleCmdFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected