Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udev and SDL Sensor and Touchpad #16188

Open
wants to merge 59 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
5428652
Added udev sensor support
oshaboy Jan 31, 2024
606742b
Fixed segfault and added hotplug support.
oshaboy Jan 31, 2024
7775239
Preliminary SDL Gyro Support
oshaboy Feb 1, 2024
ebe99ab
buncha stuff
oshaboy Feb 2, 2024
75b9de3
Comments and UDEV_TOUCH_SUPPORT flag.
oshaboy Feb 2, 2024
5fcea9b
Remove C++ style comments
oshaboy Feb 2, 2024
0277283
Update sdl_input.c
oshaboy Feb 2, 2024
5113a52
Removed silly printf hack and used proper facilities.
oshaboy Feb 2, 2024
7dc3bdb
Menu Stuff
oshaboy Feb 3, 2024
7d3fcc1
Merge branch 'libretro:master' into linux_sensor
oshaboy Feb 3, 2024
6fdfa1c
Merge branch 'linux_sensor' of https://github.com/oshaboy/RetroArch i…
oshaboy Feb 3, 2024
91613a4
I forgot a few files.
oshaboy Feb 3, 2024
ac21e7d
Moved sensitivity adjustment to some other function
oshaboy Feb 3, 2024
17a87f1
Various
oshaboy Feb 3, 2024
809d53f
Segfault fix and macro renaming
oshaboy Feb 3, 2024
1a30370
Now SDL Sensor gives names.
oshaboy Feb 5, 2024
6c7f783
Update sdl_input.c
oshaboy Feb 5, 2024
adcb02d
Update sdl_input.c
oshaboy Feb 5, 2024
cafaeff
Update sdl_input.c
oshaboy Feb 5, 2024
2ab1ef5
Mostly menu stuff for sensors
oshaboy Feb 21, 2024
c218c60
Merge branch 'master' into linux_sensor
oshaboy Feb 22, 2024
9d9e388
Messed up the merge
oshaboy Feb 22, 2024
cbb2b64
typo
oshaboy Feb 22, 2024
6a91a2c
Update configuration.c
oshaboy Apr 15, 2024
aef3009
Gave up on menu settings
oshaboy Apr 22, 2024
19f47d2
Merge branch 'master' into linux_sensor
oshaboy Apr 22, 2024
a4c6880
I commented out the wrong thing
oshaboy Apr 22, 2024
a0887a1
Merge branch 'linux_sensor' of https://github.com/oshaboy/RetroArch i…
oshaboy Apr 22, 2024
db24c1e
Made sensor remapping work for all drivers.
oshaboy May 30, 2024
0da83e8
C89 is bleh.
oshaboy May 30, 2024
9e959cb
Typo
oshaboy Aug 25, 2024
a1ebece
Merge branch 'master' into linux_sensor
oshaboy Aug 26, 2024
0a926bf
Messed Up the merge conflict
oshaboy Aug 26, 2024
034a8aa
Update net_retropad_core.c
oshaboy Aug 26, 2024
31bf40d
Merge branch 'master' into linux_sensor
oshaboy Sep 11, 2024
a34c408
I accidentally the semicolon
oshaboy Sep 11, 2024
eac2e22
Merge branch 'master' into linux_sensor
oshaboy Jan 11, 2025
585522d
More Merge Conflicts
oshaboy Jan 11, 2025
191f9a1
Update sdl_input.c
oshaboy Jan 11, 2025
09a6afa
I think it's working now but there's a bug in the light sensor code t…
oshaboy Jan 11, 2025
835974e
Whoops made a mistake.
oshaboy Jan 11, 2025
e1942e4
Merge branch 'libretro:master' into linux_sensor
oshaboy Jan 15, 2025
ed0e7f4
Code Review
oshaboy Jan 15, 2025
fc6ad33
I should probably add these comments back despite the fact that they'…
oshaboy Jan 15, 2025
c553cd1
C89 Comments
oshaboy Jan 15, 2025
ec6dc65
Moved the enums to where the define originally was
oshaboy Jan 15, 2025
ed36cb5
Uncommented Sensor Menu Code
oshaboy Jan 16, 2025
8b57051
I don't know why past me messed with code that wasn't related.
oshaboy Jan 16, 2025
e33b667
test labels
oshaboy Jan 16, 2025
5563b32
More menu stuff
oshaboy Jan 17, 2025
1c9951d
I got the menu kinda sorta working
oshaboy Jan 17, 2025
9730936
Finally got the menu remap working.
oshaboy Jan 17, 2025
6f72620
autoconfig
oshaboy Jan 19, 2025
23d7b75
removed debug stuff
oshaboy Jan 19, 2025
a65e2fc
I'm giving up on the wiimote
oshaboy Jan 19, 2025
7382561
I did not mean to remove that line
oshaboy Jan 20, 2025
20e3839
Forgot to add this check to the config file.
oshaboy Jan 20, 2025
08e8341
Update configuration.c
oshaboy Jan 20, 2025
0cac7a4
Minor changes
oshaboy Jan 20, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions libretro-common/include/libretro.h
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did I get wrong when I wrote this documentation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That the axes aren't really mapped to any specific direction, they are kinda arbitrary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the axis remapping is implemented this might be true.

Original file line number Diff line number Diff line change
Expand Up @@ -7313,14 +7313,75 @@ struct retro_device_power
};
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
Loading