Skip to content

Commit

Permalink
Moved the enums to where the define originally was
Browse files Browse the repository at this point in the history
  • Loading branch information
oshaboy committed Jan 15, 2025
1 parent c553cd1 commit ec6dc65
Showing 1 changed file with 71 additions and 72 deletions.
143 changes: 71 additions & 72 deletions libretro-common/include/libretro.h
Original file line number Diff line number Diff line change
Expand Up @@ -4457,8 +4457,79 @@ enum retro_sensor_action
RETRO_SENSOR_DUMMY = INT_MAX
};

enum retro_sensor_selector
{
/**
* Returns the device's acceleration along its local X axis minus the effect of gravity, in m/s^2.
*
* Positive values mean that the device is accelerating to the right.
* assuming the user is looking at it head-on.
*/
RETRO_SENSOR_ACCELEROMETER_X,

/**
* Returns the device's acceleration along its local Y axis minus the effect of gravity, in m/s^2.
*
* Positive values mean that the device is accelerating upwards,
* assuming the user is looking at it head-on.
*/
RETRO_SENSOR_ACCELEROMETER_Y,

/**
* Returns the the device's acceleration along its local Z axis minus the effect of gravity, in m/s^2.
*
* Positive values indicate forward acceleration towards the user,
* assuming the user is looking at the device head-on.
*/
RETRO_SENSOR_ACCELEROMETER_Z,

/**
* Returns the angular velocity of the device around its local X axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_X,

/**
* Returns the angular velocity of the device around its local Z axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_Y,

/**
* Returns the angular velocity of the device around its local Z axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_Z,

/**
* Returns the ambient illuminance (light intensity) of the device's environment, in lux.
*
* @see https://en.wikipedia.org/wiki/Lux for a table of common lux values.
*/
RETRO_SENSOR_ILLUMINANCE,


RETRO_SENSOR_MAX,

/** Dummy value to ensure sizeof(enum retro_hw_context_type) == sizeof(int). Do not use. */
RETRO_SENSOR_SELECTOR_DUMMY=INT_MAX
};

/**
* Adjusts the state of a sensor.
*
Expand Down Expand Up @@ -7311,79 +7382,7 @@ struct retro_device_power
*/
int8_t percent;
};
enum retro_sensor_selector
{

/**
* Returns the device's acceleration along its local X axis minus the effect of gravity, in m/s^2.
*
* Positive values mean that the device is accelerating to the right.
* assuming the user is looking at it head-on.
*/
RETRO_SENSOR_ACCELEROMETER_X,

/**
* Returns the device's acceleration along its local Y axis minus the effect of gravity, in m/s^2.
*
* Positive values mean that the device is accelerating upwards,
* assuming the user is looking at it head-on.
*/
RETRO_SENSOR_ACCELEROMETER_Y,

/**
* Returns the the device's acceleration along its local Z axis minus the effect of gravity, in m/s^2.
*
* Positive values indicate forward acceleration towards the user,
* assuming the user is looking at the device head-on.
*/
RETRO_SENSOR_ACCELEROMETER_Z,

/**
* Returns the angular velocity of the device around its local X axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_X,

/**
* Returns the angular velocity of the device around its local Z axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_Y,

/**
* Returns the angular velocity of the device around its local Z axis, in radians per second.
*
* Positive values indicate counter-clockwise rotation.
*
* @note A radian is about 57 degrees, and a full 360-degree rotation is 2*pi radians.
* @see https://developer.android.com/reference/android/hardware/SensorEvent#sensor.type_gyroscope
* for guidance on using this value to derive a device's orientation.
*/
RETRO_SENSOR_GYROSCOPE_Z,

/**
* Returns the ambient illuminance (light intensity) of the device's environment, in lux.
*
* @see https://en.wikipedia.org/wiki/Lux for a table of common lux values.
*/
RETRO_SENSOR_ILLUMINANCE,


RETRO_SENSOR_MAX,

/** Dummy value to ensure sizeof(enum retro_hw_context_type) == sizeof(int). Do not use. */
RETRO_SENSOR_SELECTOR_DUMMY=INT_MAX
};
/** @} */

/**
Expand Down

0 comments on commit ec6dc65

Please sign in to comment.