summaryrefslogtreecommitdiff
path: root/recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch')
-rw-r--r--recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch b/recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch
new file mode 100644
index 0000000000..7f88956d94
--- /dev/null
+++ b/recipes/libsdl/libsdl-qpe-1.2.9/mouse-1.2.9.patch
@@ -0,0 +1,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;