-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsensor.js
36 lines (33 loc) · 1.13 KB
/
sensor.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
const {
e,
en,
push_export
} = require('./api');
e.SDL_SENSOR_INVALID = en(-1);
e.SDL_SENSOR_UNKNOWN = en();
e.SDL_SENSOR_ACCEL = en();
e.SDL_SENSOR_GYRO = en();
e.SDL_SENSOR_ACCEL_L = en();
e.SDL_SENSOR_GYRO_L = en();
e.SDL_SENSOR_ACCEL_R = en();
e.SDL_SENSOR_GYRO_R = en();
e.SDL_STANDARD_GRAVITY = 9.80665;
push_export({
'SDL_LockSensors': ['void', []],
'SDL_UnlockSensors': ['void', []],
'SDL_NumSensors': ['int', []],
'SDL_SensorGetDeviceName': ['string', ['int']],
'SDL_SensorGetDeviceType': ['int', ['int']],
'SDL_SensorGetDeviceNonPortableType': ['int', ['int']],
'SDL_SensorGetDeviceInstanceID': ['int32', ['int']],
'SDL_SensorOpen': ['void*', ['int']],
'SDL_SensorFromInstanceID': ['void*', ['int32']],
'SDL_SensorGetName': ['string', ['void*']],
'SDL_SensorGetType': ['int', ['void*']],
'SDL_SensorGetNonPortableType': ['int', ['void*']],
'SDL_SensorGetInstanceID': ['int32', ['void*']],
'SDL_SensorGetData': ['int', ['void*', 'float*', 'int']],
'SDL_SensorGetDataWithTimestamp': ['int', ['void*', 'Uint64*', 'float*', 'int']],
'SDL_SensorClose': ['void', ['void*']],
'SDL_SensorUpdate': ['void', []]
});