From: Ryan C. Gordon Date: Sun, 7 Aug 2005 21:07:55 +0000 (+0000) Subject: Fixed mouse buttons. X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=0ca5e88eabdd3aa3eb010460a73d10d8ebde61d8;p=lugaru.git Fixed mouse buttons. --- diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 155a3a2..e5e4549 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -425,6 +425,11 @@ static void initSDLKeyTable(void) static inline int clamp_sdl_mouse_button(Uint8 button) { + if (button == 2) // right mouse button is button 3 in SDL. + button = 3; + else if (button == 3) + button = 2; + if ((button >= 1) && (button <= 3)) return button - 1; return -1;