summaryrefslogtreecommitdiffstats
path: root/src/citra
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp17
-rw-r--r--src/citra_qt/bootmanager.cpp22
2 files changed, 14 insertions, 25 deletions
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<u16>(x), static_cast<u16>(y));
- } else if (action == GLFW_RELEASE) {
- emu_window->TouchReleased(layout, static_cast<u16>(x), static_cast<u16>(y));
- }
+ if (action == GLFW_PRESS)
+ emu_window->TouchPressed(static_cast<unsigned>(x), static_cast<unsigned>(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<u16>(x), static_cast<u16>(y));
+ GetEmuWindow(win)->TouchMoved(static_cast<unsigned>(x), static_cast<unsigned>(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
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index cf07e65cc..b81bd6167 100644
--- a/src/citra_qt/bootmanager.cpp
+++ b/src/citra_qt/bootmanager.cpp
@@ -268,39 +268,33 @@ QByteArray GRenderWindow::saveGeometry()
void GRenderWindow::keyPressEvent(QKeyEvent* event)
{
- EmuWindow::KeyPressed({event->key(), keyboard_id});
- Service::HID::PadUpdateComplete();
+ this->KeyPressed({event->key(), keyboard_id});
}
void GRenderWindow::keyReleaseEvent(QKeyEvent* event)
{
- EmuWindow::KeyReleased({event->key(), keyboard_id});
- Service::HID::PadUpdateComplete();
+ this->KeyReleased({event->key(), keyboard_id});
}
void GRenderWindow::mousePressEvent(QMouseEvent *event)
{
- if (event->button() == Qt::LeftButton) {
+ if (event->button() == Qt::LeftButton)
+ {
auto pos = event->pos();
- EmuWindow::TouchPressed(GetFramebufferLayout(), static_cast<u16>(pos.x()),
- static_cast<u16>(pos.y()));
+ this->TouchPressed(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y()));
}
}
void GRenderWindow::mouseMoveEvent(QMouseEvent *event)
{
auto pos = event->pos();
- EmuWindow::TouchMoved(GetFramebufferLayout(), static_cast<u16>(pos.x()),
- static_cast<u16>(pos.y()));
+ this->TouchMoved(static_cast<unsigned>(pos.x()), static_cast<unsigned>(pos.y()));
}
void GRenderWindow::mouseReleaseEvent(QMouseEvent *event)
{
- if (event->button() == Qt::LeftButton) {
- auto pos = event->pos();
- EmuWindow::TouchReleased(GetFramebufferLayout(), static_cast<u16>(pos.x()),
- static_cast<u16>(pos.y()));
- }
+ if (event->button() == Qt::LeftButton)
+ this->TouchReleased();
}
void GRenderWindow::ReloadSetKeymaps()