diff src/video/directfb/SDL_DirectFB_video.h @ 2860:6ce28e5287e9

Date: Sun, 07 Dec 2008 13:35:23 +0100 From: Couriersud Subject: SDL: Mouse last_x, last_y into SDL_Mouse the attached diff moves the static vars last_x and last_y into SDL_Mouse. These, as far as I understand it, should be tied to the individual mouse. The patch also makes the code check for out of window conditions of mouse->x,y when relative movements are passed to MouseSendMotion. Also attached is the latest DirectFB code (dfb20081208) supporting multiple mice and keyboards. This works quite well with sdlmame now. It however needs more testing with different directfb configurations.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 08 Dec 2008 00:52:12 +0000
parents 99210400e8b9
children d364ee9b9c15
line wrap: on
line diff
--- a/src/video/directfb/SDL_DirectFB_video.h	Mon Dec 08 00:27:32 2008 +0000
+++ b/src/video/directfb/SDL_DirectFB_video.h	Mon Dec 08 00:52:12 2008 +0000
@@ -31,6 +31,8 @@
 
 #include "SDL_mouse.h"
 
+#define LINUX_INPUT_SUPPORT	1
+
 #define DEBUG 0
 #define LOG_CHANNEL 	stdout
 
@@ -124,9 +126,14 @@
     int initialized;
 
     IDirectFB *dfb;
-    int mouse;
-    int keyboard;
-    int kbdgeneric;
+    int num_mice;
+    int mouse_id[0x100];
+    int num_keyboard;
+    struct
+    {
+        int is_generic;
+        int id;
+    } keyboard[10];
     DFB_WindowData *firstwin;
 
     int use_yuv_underlays;