summaryrefslogtreecommitdiff
path: root/src/citra/emu_window/emu_window_glfw.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2015-05-02 19:15:03 +0200
committerTony Wasserka <neobrainx@gmail.com>2015-05-02 19:15:03 +0200
commit7859b145cf11aaed39fc430ab1cf277a0cc39e77 (patch)
tree66b4622566d00fe5788dc8ce7dbfc899d9c056d6 /src/citra/emu_window/emu_window_glfw.cpp
parent6a2d8c46f21e8813e0472dba28932ed461ce1a66 (diff)
parentb8328593fe3d60ecb066ad0959d8c1e8dfb4d3c5 (diff)
Merge pull request #698 from Zaneo/clip_stylus_input
EmuWindow: Clip mouse input coordinates to emulated screen dimensions.
Diffstat (limited to 'src/citra/emu_window/emu_window_glfw.cpp')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 997e3bc7d..f879ee7ca 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -31,7 +31,7 @@ void EmuWindow_GLFW::OnMouseButtonEvent(GLFWwindow* win, int button, int action,
}
void EmuWindow_GLFW::OnCursorPosEvent(GLFWwindow* win, double x, double y) {
- GetEmuWindow(win)->TouchMoved(static_cast<unsigned>(x), static_cast<unsigned>(y));
+ GetEmuWindow(win)->TouchMoved(static_cast<unsigned>(std::max(x, 0.0)), static_cast<unsigned>(std::max(y, 0.0)));
}
/// Called by GLFW when a key event occurs