aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/citra
diff options
context:
space:
mode:
authorGravatar bunnei <bunneidev@gmail.com>2015-03-08 21:45:45 -0400
committerGravatar bunnei <bunneidev@gmail.com>2015-03-10 18:05:20 -0400
commit953e09ddb5cab8f4d8606966020e8eefa20e04ce (patch)
tree9c128bb200272f233f6a4859640a74e34ba84b70 /src/citra
parenta1a1a5c6c537fa35f914e3bb5deaae48ada95c99 (diff)
EmuWindow: Made pad/touch functions non-static.
Diffstat (limited to 'src/citra')
-rw-r--r--src/citra/emu_window/emu_window_glfw.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/citra/emu_window/emu_window_glfw.cpp b/src/citra/emu_window/emu_window_glfw.cpp
index 8a0cd9b5..3e58d666 100644
--- a/src/citra/emu_window/emu_window_glfw.cpp
+++ b/src/citra/emu_window/emu_window_glfw.cpp
@@ -16,35 +16,36 @@ EmuWindow_GLFW* EmuWindow_GLFW::GetEmuWindow(GLFWwindow* win) {
return static_cast<EmuWindow_GLFW*>(glfwGetWindowUserPointer(win));
}
-void EmuWindow_GLFW::OnMouseButtonEvent(GLFWwindow* window, int button, int action, int mods) {
+void EmuWindow_GLFW::OnMouseButtonEvent(GLFWwindow* win, int button, int action, int mods) {
if (button == GLFW_MOUSE_BUTTON_LEFT) {
- auto layout = GetEmuWindow(window)->GetFramebufferLayout();
+ auto emu_window = GetEmuWindow(win);
+ auto layout = emu_window->GetFramebufferLayout();
double x, y;
- glfwGetCursorPos(window, &x, &y);
+ glfwGetCursorPos(win, &x, &y);
if (action == GLFW_PRESS) {
- EmuWindow::TouchPressed(layout, static_cast<u16>(x), static_cast<u16>(y));
+ emu_window->TouchPressed(layout, static_cast<u16>(x), static_cast<u16>(y));
} else if (action == GLFW_RELEASE) {
- EmuWindow::TouchReleased(layout, static_cast<u16>(x), static_cast<u16>(y));
+ emu_window->TouchReleased(layout, static_cast<u16>(x), static_cast<u16>(y));
}
}
}
-void EmuWindow_GLFW::OnCursorPosEvent(GLFWwindow* window, double x, double y) {
-
- auto layout = GetEmuWindow(window)->GetFramebufferLayout();
- EmuWindow::TouchMoved(layout, static_cast<u16>(x), static_cast<u16>(y));
+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));
}
/// Called by GLFW when a key event occurs
void EmuWindow_GLFW::OnKeyEvent(GLFWwindow* win, int key, int scancode, int action, int mods) {
-
- int keyboard_id = GetEmuWindow(win)->keyboard_id;
+ auto emu_window = GetEmuWindow(win);
+ int keyboard_id = emu_window->keyboard_id;
if (action == GLFW_PRESS) {
- EmuWindow::KeyPressed({key, keyboard_id});
+ emu_window->KeyPressed({key, keyboard_id});
} else if (action == GLFW_RELEASE) {
- EmuWindow::KeyReleased({key, keyboard_id});
+ emu_window->KeyReleased({ key, keyboard_id });
}
Service::HID::PadUpdateComplete();