mirror of https://github.com/axmolengine/axmol.git
rename to with Jni suffex
This commit is contained in:
parent
27c3a459ed
commit
266e4e1654
|
@ -18,17 +18,17 @@ void Device::setAccelerometerEnabled(bool isEnabled)
|
|||
{
|
||||
if (isEnabled)
|
||||
{
|
||||
enableAccelerometer_native();
|
||||
enableAccelerometerJni();
|
||||
}
|
||||
else
|
||||
{
|
||||
disableAccelerometer_native();
|
||||
disableAccelerometerJni();
|
||||
}
|
||||
}
|
||||
|
||||
void Device::setAccelerometerInterval(float interval)
|
||||
{
|
||||
setAccelerometerInterval_native(interval);
|
||||
setAccelerometerIntervalJni(interval);
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -471,8 +471,8 @@ static int32_t engine_handle_input(struct android_app* app, AInputEvent* event)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void enableAccelerometer_native(void) {
|
||||
LOGI("enableAccelerometer_native()");
|
||||
void enableAccelerometerJni(void) {
|
||||
LOGI("enableAccelerometerJni()");
|
||||
|
||||
if (engine.accelerometerSensor != NULL) {
|
||||
ASensorEventQueue_enableSensor(engine.sensorEventQueue,
|
||||
|
@ -485,8 +485,8 @@ void enableAccelerometer_native(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void disableAccelerometer_native(void) {
|
||||
LOGI("disableAccelerometer_native()");
|
||||
void disableAccelerometerJni(void) {
|
||||
LOGI("disableAccelerometerJni()");
|
||||
|
||||
if (engine.accelerometerSensor != NULL) {
|
||||
ASensorEventQueue_disableSensor(engine.sensorEventQueue,
|
||||
|
@ -494,8 +494,8 @@ void disableAccelerometer_native(void) {
|
|||
}
|
||||
}
|
||||
|
||||
void setAccelerometerInterval_native(float interval) {
|
||||
LOGI("setAccelerometerInterval_native(%f)", interval);
|
||||
void setAccelerometerIntervalJni(float interval) {
|
||||
LOGI("setAccelerometerIntervalJni(%f)", interval);
|
||||
// We'd like to get 60 events per second (in us).
|
||||
ASensorEventQueue_setEventRate(engine.sensorEventQueue,
|
||||
engine.accelerometerSensor, interval * 1000000L);
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
* This is the interface to the Android native activity
|
||||
*/
|
||||
|
||||
void enableAccelerometer_native(void);
|
||||
void disableAccelerometer_native(void);
|
||||
void setAccelerometerInterval_native(float interval);
|
||||
void enableAccelerometerJni(void);
|
||||
void disableAccelerometerJni(void);
|
||||
void setAccelerometerIntervalJni(float interval);
|
||||
|
||||
#endif // __COCOSNATIVEACTIVITY_H__
|
||||
|
|
Loading…
Reference in New Issue