1
0
Fork 0

Add 3D slider value to the HID shared page (#5676)

* Add 3D slider value to the HID shared page; Fixes MSet

* Use f32
This commit is contained in:
xperia64 2021-01-05 21:01:01 +00:00 committed by GitHub
parent 50eb634583
commit e33677b021
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -224,6 +224,7 @@ void Module::UpdatePadCallback(u64 userdata, s64 cycles_late) {
// TODO(xperia64): How the 3D Slider is updated by the HID module needs to be RE'd // TODO(xperia64): How the 3D Slider is updated by the HID module needs to be RE'd
// and possibly moved to its own Core::Timing event. // and possibly moved to its own Core::Timing event.
mem->pad.sliderstate_3d = (Settings::values.factor_3d / 100.0f);
system.Kernel().GetSharedPageHandler().Set3DSlider(Settings::values.factor_3d / 100.0f); system.Kernel().GetSharedPageHandler().Set3DSlider(Settings::values.factor_3d / 100.0f);
// Reschedule recurrent event // Reschedule recurrent event

View File

@ -110,7 +110,9 @@ struct SharedMem {
s64 index_reset_ticks_previous; ///< Previous `index_reset_ticks` s64 index_reset_ticks_previous; ///< Previous `index_reset_ticks`
u32 index; ///< Index of the last updated pad state entry u32 index; ///< Index of the last updated pad state entry
INSERT_PADDING_WORDS(0x2); INSERT_PADDING_WORDS(0x1);
f32 sliderstate_3d;
PadState current_state; ///< Current state of the pad buttons PadState current_state; ///< Current state of the pad buttons