Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Date: Sat, 06 Dec 2008 14:54:10 +0100
Browse files Browse the repository at this point in the history
From: Couriersud
Subject: SDL: DirectFB mouse patch

the attached patch (again) properly registers the mouse in the DirectFB
driver.
  • Loading branch information
slouken committed Dec 6, 2008
1 parent a3b15c4 commit acc413d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/video/directfb/SDL_DirectFB_modes.c
Expand Up @@ -348,9 +348,11 @@ DirectFB_InitModes(_THIS)
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));

Expand Down Expand Up @@ -467,7 +469,7 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
mode->format);
return -1;
}

data->pixelformat = rconfig.pixelformat;
data->cw = config.width;
data->ch = config.height;
Expand Down
3 changes: 2 additions & 1 deletion src/video/directfb/SDL_DirectFB_mouse.c
Expand Up @@ -49,7 +49,8 @@ DirectFB_InitMouse(_THIS)
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
Expand Down

0 comments on commit acc413d

Please sign in to comment.