From 977f17a0c87ac98777ca2c1a45b8cb3b1be18a40 Mon Sep 17 00:00:00 2001 From: James Date: Mon, 25 Oct 2021 15:42:04 -0400 Subject: [PATCH] Fix bad signature after rebase, and remove input related functions. --- .../Platform/Window/GLFWWindowBackend.cpp | 21 ------------------- .../Platform/Window/GLFWWindowBackend.hpp | 2 +- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/src/Core/Platform/Window/GLFWWindowBackend.cpp b/src/Core/Platform/Window/GLFWWindowBackend.cpp index b36c8b1b0a..5733771a66 100644 --- a/src/Core/Platform/Window/GLFWWindowBackend.cpp +++ b/src/Core/Platform/Window/GLFWWindowBackend.cpp @@ -96,27 +96,6 @@ namespace Core::Platform::Window { } }); - // Window key callback - glfwSetKeyCallback(this->windowHandle, [](GLFWwindow* window, int key, int scancode, int action, int mods){ - auto time = std::chrono::steady_clock::now(); - auto legacy_key = GLFWWindowBackend::convertKeyToLegacy(key); - DeviceInput di(DEVICE_KEYBOARD, legacy_key, action == GLFW_PRESS ? 1 : 0, time); - INPUTFILTER->ButtonPressed(di); - }); - - // Window mouse callback - glfwSetMouseButtonCallback(this->windowHandle, [](GLFWwindow* window, int button, int action, int mods){ - auto time = std::chrono::steady_clock::now(); - auto legacy_key = GLFWWindowBackend::convertKeyToLegacy(button); - DeviceInput di(DEVICE_MOUSE, legacy_key, action == GLFW_PRESS ? 1 : 0, time); - INPUTFILTER->ButtonPressed(di); - }); - - // Window specific mouse position callback - glfwSetCursorPosCallback(this->windowHandle, [](GLFWwindow* window, double xpos, double ypos){ - INPUTFILTER->UpdateCursorLocation(static_cast(xpos), static_cast(ypos)); - }); - glfwSwapInterval(0); // Don't wait for vsync } diff --git a/src/Core/Platform/Window/GLFWWindowBackend.hpp b/src/Core/Platform/Window/GLFWWindowBackend.hpp index 28ba8f27b8..c21e0af8d0 100644 --- a/src/Core/Platform/Window/GLFWWindowBackend.hpp +++ b/src/Core/Platform/Window/GLFWWindowBackend.hpp @@ -34,7 +34,7 @@ class GLFWWindowBackend : public IWindowBackend { private: GLFWwindow *windowHandle{nullptr}; /** @brief A reference to the window backend*/ - static DeviceButton convertKeyToLegacy(int keycode); + static DeviceButton convertKeyToLegacy(int keycode, int mods); }; }