diff --git a/addons/ofxAccelerometer/src/ofxAccelerometer.h b/addons/ofxAccelerometer/src/ofxAccelerometer.h index ed25ebabf99..e07e30b5f89 100644 --- a/addons/ofxAccelerometer/src/ofxAccelerometer.h +++ b/addons/ofxAccelerometer/src/ofxAccelerometer.h @@ -36,6 +36,8 @@ #include "ofEvents.h" #include "ofMathConstants.h" +#include + typedef void (*ofxAccelCB)(ofPoint&); // typedef for accelerometer callback class ofxAccelerometerHandler { @@ -159,7 +161,7 @@ class ofxAccelerometerHandler { if(length < 0.1) return; //Clear matrix to be used to rotate from the current referential to one based on the gravity vector - bzero(matrix, sizeof(matrix)); + memset(matrix, 0, sizeof(matrix)); matrix[3][3] = 1.0; //Setup first matrix column as gravity vector