Skip to content

Commit

Permalink
Fix bad signature after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
jameskr97 committed Oct 25, 2021
1 parent 3fe632b commit 23bfc1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
21 changes: 0 additions & 21 deletions src/Core/Platform/Window/GLFWWindowBackend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<float>(xpos), static_cast<float>(ypos));
});

glfwSwapInterval(0); // Don't wait for vsync
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/Platform/Window/GLFWWindowBackend.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};

}
Expand Down

0 comments on commit 23bfc1e

Please sign in to comment.