From d61b26b79f889603a084e148626bba3c267cf75f Mon Sep 17 00:00:00 2001 From: bunnei Date: Mon, 9 Mar 2015 00:14:59 -0400 Subject: HID: Complete refactor of pad/touch input to fix threading issues. --- src/citra/emu_window/emu_window_glfw.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/citra') diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp index 3e58d6663..997e3bc7d 100644 --- a/src/citra/emu_window/emu_window_glfw.cpp +++ b/src/citra/emu_window/emu_window_glfw.cpp @@ -23,18 +23,15 @@ void EmuWindow_GLFW::OnMouseButtonEvent(GLFWwindow* win, int button, int action, double x, y; glfwGetCursorPos(win, &x, &y); - if (action == GLFW_PRESS) { - emu_window->TouchPressed(layout, static_cast(x), static_cast(y)); - } else if (action == GLFW_RELEASE) { - emu_window->TouchReleased(layout, static_cast(x), static_cast(y)); - } + if (action == GLFW_PRESS) + emu_window->TouchPressed(static_cast(x), static_cast(y)); + else if (action == GLFW_RELEASE) + emu_window->TouchReleased(); } } void EmuWindow_GLFW::OnCursorPosEvent(GLFWwindow* win, double x, double y) { - auto emu_window = GetEmuWindow(win); - auto layout = emu_window->GetFramebufferLayout(); - emu_window->TouchMoved(layout, static_cast(x), static_cast(y)); + GetEmuWindow(win)->TouchMoved(static_cast(x), static_cast(y)); } /// Called by GLFW when a key event occurs @@ -45,10 +42,8 @@ void EmuWindow_GLFW::OnKeyEvent(GLFWwindow* win, int key, int scancode, int acti if (action == GLFW_PRESS) { emu_window->KeyPressed({key, keyboard_id}); } else if (action == GLFW_RELEASE) { - emu_window->KeyReleased({ key, keyboard_id }); + emu_window->KeyReleased({key, keyboard_id}); } - - Service::HID::PadUpdateComplete(); } /// Whether the window is still open, and a close request hasn't yet been sent -- cgit v1.2.3