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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403322
This commit is contained in:
Sam Lantinga 2008-12-08 00:52:12 +00:00
parent 0c30a927ed
commit 61a7bca88f
7 changed files with 385 additions and 99 deletions

View file

@ -31,6 +31,8 @@
#include "SDL_mouse.h"
#define LINUX_INPUT_SUPPORT 1
#define DEBUG 0
#define LOG_CHANNEL stdout
@ -124,9 +126,14 @@ struct _DFB_DeviceData
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;