diff --git a/rpcs3/Emu/Io/PadHandler.h b/rpcs3/Emu/Io/PadHandler.h index 802cc364b0..68f07c3574 100644 --- a/rpcs3/Emu/Io/PadHandler.h +++ b/rpcs3/Emu/Io/PadHandler.h @@ -321,11 +321,6 @@ protected: std::unordered_map button_list; std::vector blacklist; - template - T lerp(T v0, T v1, T t) { - return std::fma(t, v1, std::fma(-t, v0, v0)); - } - // Search an unordered map for a string value and return found keycode static int FindKeyCode(const std::unordered_map& map, const cfg::string& name, bool fallback = true); diff --git a/rpcs3/Input/keyboard_pad_handler.cpp b/rpcs3/Input/keyboard_pad_handler.cpp index e1f5214d85..9dcfa91c1b 100644 --- a/rpcs3/Input/keyboard_pad_handler.cpp +++ b/rpcs3/Input/keyboard_pad_handler.cpp @@ -693,7 +693,7 @@ void keyboard_pad_handler::ThreadProc() const f32 v1 = static_cast(m_stick_val[j]); // linear interpolation from the current stick value v0 to the desired stick value v1 - f32 res = lerp(v0, v1, stick_lerp_factor); + f32 res = std::lerp(v0, v1, stick_lerp_factor); // round to the correct direction to prevent sticky sticks on small factors res = (v0 <= v1) ? std::ceil(res) : std::floor(res);