mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-16 20:07:16 +01:00
Do 3D slider updating in the HID module
This commit is contained in:
parent
81f4cef201
commit
6f2eb2a418
@ -121,6 +121,10 @@ void Handler::Set3DLed(u8 state) {
|
|||||||
shared_page.ledstate_3d = state;
|
shared_page.ledstate_3d = state;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Handler::Set3DSlider(float_le slidestate) {
|
||||||
|
shared_page.sliderstate_3d = slidestate;
|
||||||
|
}
|
||||||
|
|
||||||
SharedPageDef& Handler::GetSharedPage() {
|
SharedPageDef& Handler::GetSharedPage() {
|
||||||
return shared_page;
|
return shared_page;
|
||||||
}
|
}
|
||||||
|
@ -89,6 +89,8 @@ public:
|
|||||||
|
|
||||||
void SetWifiLinkLevel(WifiLinkLevel);
|
void SetWifiLinkLevel(WifiLinkLevel);
|
||||||
|
|
||||||
|
void Set3DSlider(float_le);
|
||||||
|
|
||||||
void Set3DLed(u8);
|
void Set3DLed(u8);
|
||||||
|
|
||||||
SharedPageDef& GetSharedPage();
|
SharedPageDef& GetSharedPage();
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include "core/hle/kernel/event.h"
|
#include "core/hle/kernel/event.h"
|
||||||
#include "core/hle/kernel/handle_table.h"
|
#include "core/hle/kernel/handle_table.h"
|
||||||
#include "core/hle/kernel/shared_memory.h"
|
#include "core/hle/kernel/shared_memory.h"
|
||||||
|
#include "core/hle/kernel/shared_page.h"
|
||||||
#include "core/hle/service/hid/hid.h"
|
#include "core/hle/service/hid/hid.h"
|
||||||
#include "core/hle/service/hid/hid_spvr.h"
|
#include "core/hle/service/hid/hid_spvr.h"
|
||||||
#include "core/hle/service/hid/hid_user.h"
|
#include "core/hle/service/hid/hid_user.h"
|
||||||
@ -160,6 +161,12 @@ void Module::UpdatePadCallback(u64 userdata, s64 cycles_late) {
|
|||||||
event_pad_or_touch_1->Signal();
|
event_pad_or_touch_1->Signal();
|
||||||
event_pad_or_touch_2->Signal();
|
event_pad_or_touch_2->Signal();
|
||||||
|
|
||||||
|
// 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.
|
||||||
|
system.Kernel().GetSharedPageHandler().Set3DSlider(
|
||||||
|
Settings::values.toggle_3d ? static_cast<float_le>(Settings::values.factor_3d) / 100
|
||||||
|
: 0.0f);
|
||||||
|
|
||||||
// Reschedule recurrent event
|
// Reschedule recurrent event
|
||||||
system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event);
|
system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user