src/sensor/windows/SDL_windowssensor.c
changeset 13842 a09f7d0800eb
parent 13841 b89df0d683ad
child 13844 3c44ba7a04fd
equal deleted inserted replaced
13841:b89df0d683ad 13842:a09f7d0800eb
   159 #ifdef DEBUG_SENSORS
   159 #ifdef DEBUG_SENSORS
   160                 SDL_Log("Sensor %s data updated\n", SDL_sensors[i].name);
   160                 SDL_Log("Sensor %s data updated\n", SDL_sensors[i].name);
   161 #endif
   161 #endif
   162                 switch (SDL_sensors[i].type) {
   162                 switch (SDL_sensors[i].type) {
   163                 case SDL_SENSOR_ACCEL:
   163                 case SDL_SENSOR_ACCEL:
   164                     hrX = ISensorDataReport_GetSensorValue(pNewData, &SDL_SENSOR_DATA_TYPE_ACCELERATION_X_G, &valueX);
   164                     hrX = ISensorDataReport_GetSensorValue(pNewData, &SENSOR_DATA_TYPE_ACCELERATION_X_G, &valueX);
   165                     hrY = ISensorDataReport_GetSensorValue(pNewData, &SDL_SENSOR_DATA_TYPE_ACCELERATION_Y_G, &valueY);
   165                     hrY = ISensorDataReport_GetSensorValue(pNewData, &SENSOR_DATA_TYPE_ACCELERATION_Y_G, &valueY);
   166                     hrZ = ISensorDataReport_GetSensorValue(pNewData, &SDL_SENSOR_DATA_TYPE_ACCELERATION_Z_G, &valueZ);
   166                     hrZ = ISensorDataReport_GetSensorValue(pNewData, &SENSOR_DATA_TYPE_ACCELERATION_Z_G, &valueZ);
   167                     if (SUCCEEDED(hrX) && SUCCEEDED(hrY) && SUCCEEDED(hrZ) &&
   167                     if (SUCCEEDED(hrX) && SUCCEEDED(hrY) && SUCCEEDED(hrZ) &&
   168                         valueX.vt == VT_R8 && valueY.vt == VT_R8 && valueZ.vt == VT_R8) {
   168                         valueX.vt == VT_R8 && valueY.vt == VT_R8 && valueZ.vt == VT_R8) {
   169                         float values[3];
   169                         float values[3];
   170 
   170 
   171                         values[0] = (float)valueX.dblVal * SDL_STANDARD_GRAVITY;
   171                         values[0] = (float)valueX.dblVal * SDL_STANDARD_GRAVITY;