Skip to content

Commit 977f17a

Browse files
committed
Fix bad signature after rebase, and remove input related functions.
1 parent 5a38c31 commit 977f17a

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

src/Core/Platform/Window/GLFWWindowBackend.cpp

-21
Original file line numberDiff line numberDiff line change
@@ -96,27 +96,6 @@ namespace Core::Platform::Window {
9696
}
9797
});
9898

99-
// Window key callback
100-
glfwSetKeyCallback(this->windowHandle, [](GLFWwindow* window, int key, int scancode, int action, int mods){
101-
auto time = std::chrono::steady_clock::now();
102-
auto legacy_key = GLFWWindowBackend::convertKeyToLegacy(key);
103-
DeviceInput di(DEVICE_KEYBOARD, legacy_key, action == GLFW_PRESS ? 1 : 0, time);
104-
INPUTFILTER->ButtonPressed(di);
105-
});
106-
107-
// Window mouse callback
108-
glfwSetMouseButtonCallback(this->windowHandle, [](GLFWwindow* window, int button, int action, int mods){
109-
auto time = std::chrono::steady_clock::now();
110-
auto legacy_key = GLFWWindowBackend::convertKeyToLegacy(button);
111-
DeviceInput di(DEVICE_MOUSE, legacy_key, action == GLFW_PRESS ? 1 : 0, time);
112-
INPUTFILTER->ButtonPressed(di);
113-
});
114-
115-
// Window specific mouse position callback
116-
glfwSetCursorPosCallback(this->windowHandle, [](GLFWwindow* window, double xpos, double ypos){
117-
INPUTFILTER->UpdateCursorLocation(static_cast<float>(xpos), static_cast<float>(ypos));
118-
});
119-
12099
glfwSwapInterval(0); // Don't wait for vsync
121100
}
122101

src/Core/Platform/Window/GLFWWindowBackend.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class GLFWWindowBackend : public IWindowBackend {
3434

3535
private:
3636
GLFWwindow *windowHandle{nullptr}; /** @brief A reference to the window backend*/
37-
static DeviceButton convertKeyToLegacy(int keycode);
37+
static DeviceButton convertKeyToLegacy(int keycode, int mods);
3838
};
3939

4040
}

0 commit comments

Comments
 (0)