summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmcneill <jmcneill>2015-01-29 12:31:07 +0000
committerjmcneill <jmcneill>2015-01-29 12:31:07 +0000
commit4c2f9ed84b9866fb9cec62aa19f485593037ff98 (patch)
tree2588c4b0643f4336c895cfc74080d600d7e546c9
parentc66848dc4e803ee529eb3223cb89fb0fe50a6a73 (diff)
downloadpkgsrc-4c2f9ed84b9866fb9cec62aa19f485593037ff98.tar.gz
add wsmouse mousewheel support
-rw-r--r--devel/SDL/distinfo4
-rw-r--r--devel/SDL/patches/patch-src_video_wscons_SDL__wsconsevents.c20
2 files changed, 16 insertions, 8 deletions
diff --git a/devel/SDL/distinfo b/devel/SDL/distinfo
index 2225dd86670..883ce6dd00b 100644
--- a/devel/SDL/distinfo
+++ b/devel/SDL/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.70 2015/01/29 12:22:04 jmcneill Exp $
+$NetBSD: distinfo,v 1.71 2015/01/29 12:31:07 jmcneill Exp $
SHA1 (SDL-1.2.15.tar.gz) = 0c5f193ced810b0d7ce3ab06d808cbb5eef03a2c
RMD160 (SDL-1.2.15.tar.gz) = d4802a090cb4a24eeb0c8ce5690802f596d394c3
@@ -8,7 +8,7 @@ SHA1 (patch-ac) = 8b2dddff9ad449b19b35ef364e2d960e46284563
SHA1 (patch-src_audio_sun_SDL__sunaudio.c) = 4b492b40d39e6444037dfda55766e4a149cc6c30
SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 4ea0136f231729129b82e5f7ee4b9eaf68a13876
SHA1 (patch-src_video_quartz_SDL__QuartzVideo.h) = 19d952bade06dbd646e94f42139c38436969b1a8
-SHA1 (patch-src_video_wscons_SDL__wsconsevents.c) = 459a72044beba6655298b5ef2b4a5073a2fdb9a8
+SHA1 (patch-src_video_wscons_SDL__wsconsevents.c) = 216a07cbfb99e1f3d6fe2da191922be76cb09759
SHA1 (patch-src_video_wscons_SDL__wsconsevents__c.h) = 97206e2aca0b620005217d9d07ad1177516cac92
SHA1 (patch-src_video_wscons_SDL__wsconsvideo.c) = 17e048ccb201ae961e820ab880d5a588b2db2639
SHA1 (patch-src_video_wscons_SDL__wsconsvideo.h) = efc75da910cfe370b7361a0b9d2b90837c6b9aa9
diff --git a/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsevents.c b/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsevents.c
index 83089c22e69..eb488ec71d9 100644
--- a/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsevents.c
+++ b/devel/SDL/patches/patch-src_video_wscons_SDL__wsconsevents.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jmcneill Exp $
+$NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.9 2015/01/29 12:31:08 jmcneill Exp $
--- src/video/wscons/SDL_wsconsevents.c.orig 2012-01-19 06:30:06.000000000 +0000
+++ src/video/wscons/SDL_wsconsevents.c
@@ -61,7 +61,7 @@ $NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jm
if (tcsetattr(private->fd, TCSANOW, &private->saved_tty) < 0) {
WSCONS_ReportError("cannot restore keynoard attributes: %s",
strerror(errno));
-@@ -89,8 +114,57 @@ void WSCONS_ReleaseKeyboard(_THIS)
+@@ -89,8 +114,65 @@ void WSCONS_ReleaseKeyboard(_THIS)
}
}
@@ -115,12 +115,20 @@ $NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jm
+ case WSCONS_EVENT_MOUSE_DELTA_Y:
+ posted += SDL_PrivateMouseMotion(0, 1, 0, -ev->value);
+ break;
++ case WSCONS_EVENT_MOUSE_DELTA_Z:
++ posted += SDL_PrivateMouseButton(SDL_PRESSED,
++ ev->value > 0 ? SDL_BUTTON_WHEELUP : SDL_BUTTON_WHEELDOWN,
++ 0, 0);
++ posted += SDL_PrivateMouseButton(SDL_RELEASED,
++ ev->value > 0 ? SDL_BUTTON_WHEELUP : SDL_BUTTON_WHEELDOWN,
++ 0, 0);
++ break;
+ }
+ }
}
static SDLKey keymap[128];
-@@ -107,6 +181,11 @@ static SDL_keysym *TranslateKey(int scan
+@@ -107,6 +189,11 @@ static SDL_keysym *TranslateKey(int scan
if (keysym->sym == SDLK_UNKNOWN)
printf("Unknown mapping for scancode %d\n", scancode);
@@ -132,7 +140,7 @@ $NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jm
return keysym;
}
-@@ -120,19 +199,42 @@ static void updateKeyboard(_THIS)
+@@ -120,19 +207,42 @@ static void updateKeyboard(_THIS)
for (i = 0; i < n; i++) {
unsigned char c = buf[i] & 0x7f;
if (c == 224) // special key prefix -- what should we do with it?
@@ -179,7 +187,7 @@ $NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jm
} while (posted);
}
-@@ -146,8 +248,10 @@ void WSCONS_InitOSKeymap(_THIS)
+@@ -146,8 +256,10 @@ void WSCONS_InitOSKeymap(_THIS)
}
switch (private->kbdType) {
@@ -191,7 +199,7 @@ $NetBSD: patch-src_video_wscons_SDL__wsconsevents.c,v 1.8 2015/01/29 12:22:04 jm
/* top row */
keymap[2] = SDLK_1;
keymap[3] = SDLK_2;
-@@ -220,7 +324,6 @@ void WSCONS_InitOSKeymap(_THIS)
+@@ -220,7 +332,6 @@ void WSCONS_InitOSKeymap(_THIS)
keymap[77] = SDLK_RIGHT;
keymap[80] = SDLK_DOWN;
break;