summaryrefslogtreecommitdiff
path: root/recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch
blob: 7f88956d948d4cc1f55306d30de1742075d90124 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff -Naur SDL-1.2.9-orig/src/video/qtopia/SDL_QWin.cc SDL-1.2.9/src/video/qtopia/SDL_QWin.cc
--- SDL-1.2.9-orig/src/video/qtopia/SDL_QWin.cc	2007-03-12 20:55:07.000000000 +0100
+++ SDL-1.2.9/src/video/qtopia/SDL_QWin.cc	2007-03-12 20:56:36.000000000 +0100
@@ -169,7 +169,12 @@
   Qt::ButtonState button = e->button();
   int sdlstate = 0;
   if( (button & Qt::LeftButton)) {
-    sdlstate |= SDL_BUTTON_LMASK;
+    if (mouse_button_mode == 3)
+     sdlstate |= SDL_BUTTON_RMASK;
+	else if (mouse_button_mode == 2)
+     sdlstate |= SDL_BUTTON_MMASK;
+	else
+     sdlstate |= SDL_BUTTON_LMASK;
   }
   if( (button & Qt::RightButton)) {
     sdlstate |= SDL_BUTTON_RMASK;
@@ -539,20 +544,20 @@
     case Qt::Key_F6: scancode = SDLK_F6; break;
     case Qt::Key_F7: scancode = SDLK_F7; break;
     case Qt::Key_F8: scancode = SDLK_F8; break;
-    case Qt::Key_F9: scancode = SDLK_F9; break;
-    case Qt::Key_F10: 
-      scancode = SDLK_F10;
+    case Qt::Key_F9: 
+      scancode = SDLK_F9;
       mouse_button_mode=1;
       break;
-    case Qt::Key_F11:
-      scancode = SDLK_F11;
-      mouse_button_mode=3;
-      break;
-    case Qt::Key_F12:
-      scancode = SDLK_F12;
+    case Qt::Key_F10:
+      scancode = SDLK_F10;
       mouse_button_mode=2;
       break;
-    case Qt::Key_F13: scancode = SDLK_F13; break;
+    case Qt::Key_F11: scancode = SDLK_F11; break;
+    case Qt::Key_F12: scancode = SDLK_F12; break;
+    case Qt::Key_F13:
+      scancode = SDLK_F13;
+      mouse_button_mode=3;
+      break;
     case Qt::Key_F14: scancode = SDLK_F14; break;
     case Qt::Key_F15: scancode = SDLK_F15; break;
     case Qt::Key_Super_L: scancode = SDLK_LSUPER; break;