mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-08-09 02:07:04 +08:00
refactor(app): remove redundant ImGui WantCaptureMouse check in cursor callback
This commit is contained in:
@@ -23,12 +23,10 @@ App::App()
|
||||
App::~App() {}
|
||||
void App::cursor_position_callback(GLFWwindow* window, double xpos,
|
||||
double ypos) {
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
|
||||
App* app = static_cast<App*>(glfwGetWindowUserPointer(window));
|
||||
|
||||
ASSERT_MSG(app, "nullptr");
|
||||
if (io.WantCaptureMouse && app->m_window.is_enable_imgui()) {
|
||||
if (app->m_window.is_enable_imgui()) {
|
||||
ImGui_ImplGlfw_CursorPosCallback(window, xpos, ypos);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user