From 5f5646c85054fc2791a675624a66c25e8308314b Mon Sep 17 00:00:00 2001 From: xperia64 Date: Fri, 18 Jan 2019 15:24:39 -0500 Subject: [PATCH] Fix types --- src/core/hle/kernel/shared_page.cpp | 4 ++-- src/core/hle/kernel/shared_page.h | 2 +- src/core/hle/service/hid/hid.cpp | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/core/hle/kernel/shared_page.cpp b/src/core/hle/kernel/shared_page.cpp index c47751c73d..caf0736580 100644 --- a/src/core/hle/kernel/shared_page.cpp +++ b/src/core/hle/kernel/shared_page.cpp @@ -121,8 +121,8 @@ void Handler::Set3DLed(u8 state) { shared_page.ledstate_3d = state; } -void Handler::Set3DSlider(float_le slidestate) { - shared_page.sliderstate_3d = slidestate; +void Handler::Set3DSlider(float slidestate) { + shared_page.sliderstate_3d = static_cast(slidestate); } SharedPageDef& Handler::GetSharedPage() { diff --git a/src/core/hle/kernel/shared_page.h b/src/core/hle/kernel/shared_page.h index 2cef328262..8ea114a4eb 100644 --- a/src/core/hle/kernel/shared_page.h +++ b/src/core/hle/kernel/shared_page.h @@ -89,7 +89,7 @@ public: void SetWifiLinkLevel(WifiLinkLevel); - void Set3DSlider(float_le); + void Set3DSlider(float); void Set3DLed(u8); diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index 6b8ec91277..997c8c4949 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -164,8 +164,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 // and possibly moved to its own Core::Timing event. system.Kernel().GetSharedPageHandler().Set3DSlider( - Settings::values.toggle_3d ? static_cast(Settings::values.factor_3d) / 100 - : 0.0f); + Settings::values.toggle_3d ? Settings::values.factor_3d / 100.0f : 0.0f); // Reschedule recurrent event system.CoreTiming().ScheduleEvent(pad_update_ticks - cycles_late, pad_update_event);