# HG changeset patch # User Sam Lantinga # Date 1228585615 0 # Node ID 483f85e35a1adb7aceb5ff9be78badba70bd2ea9 # Parent 53ca0d758b0a1007175aab4a3989ef32ad31e222 Date: Sat, 06 Dec 2008 14:54:10 +0100 From: Couriersud Subject: SDL: DirectFB mouse patch the attached patch (again) properly registers the mouse in the DirectFB driver. diff -r 53ca0d758b0a -r 483f85e35a1a src/video/directfb/SDL_DirectFB_modes.c --- a/src/video/directfb/SDL_DirectFB_modes.c Sat Dec 06 17:43:10 2008 +0000 +++ b/src/video/directfb/SDL_DirectFB_modes.c Sat Dec 06 17:46:55 2008 +0000 @@ -348,9 +348,11 @@ display.driverdata = dispdata; #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2) - dlc.flags = DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | DLCONF_OPTIONS; - ret = layer->SetConfiguration(layer, &dlc); - #endif + dlc.flags = + DLCONF_WIDTH | DLCONF_HEIGHT | DLCONF_PIXELFORMAT | + DLCONF_OPTIONS; + ret = layer->SetConfiguration(layer, &dlc); +#endif SDL_DFB_CHECKERR(layer->SetCooperativeLevel(layer, DLSCL_SHARED)); @@ -467,7 +469,7 @@ mode->format); return -1; } - + data->pixelformat = rconfig.pixelformat; data->cw = config.width; data->ch = config.height; diff -r 53ca0d758b0a -r 483f85e35a1a src/video/directfb/SDL_DirectFB_mouse.c --- a/src/video/directfb/SDL_DirectFB_mouse.c Sat Dec 06 17:43:10 2008 +0000 +++ b/src/video/directfb/SDL_DirectFB_mouse.c Sat Dec 06 17:46:55 2008 +0000 @@ -49,7 +49,8 @@ mouse.WarpMouse = DirectFB_WarpMouse; mouse.FreeMouse = DirectFB_FreeMouse; mouse.cursor_shown = 1; - devdata->mouse = SDL_AddMouse(&mouse, -1, "Mouse", 0, 0, 1); + SDL_SetMouseIndexId(0, 0); /* ID == Index ! */ + devdata->mouse = SDL_AddMouse(&mouse, 0, "Mouse", 0, 0, 1); } void