Reverted Bob's indent checkin

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403475
This commit is contained in:
Sam Lantinga 2009-01-10 21:50:26 +00:00
parent e32916c7f0
commit d123950aa3
33 changed files with 501 additions and 659 deletions

View file

@ -60,9 +60,8 @@ DirectFB_SetContext(_THIS, SDL_WindowID id)
int ret;
if (dispdata->vidIDinuse)
SDL_DFB_CHECKERR(dispdata->
vidlayer->SwitchContext(dispdata->vidlayer,
DFB_TRUE));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SwitchContext(dispdata->vidlayer, DFB_TRUE));
error:
return;
@ -149,8 +148,8 @@ DirectFB_PumpEventsWindow(_THIS)
SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx,
evt.cy, 0);
SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED,
DirectFB_TranslateButton
(evt.button));
DirectFB_TranslateButton(evt.
button));
} else {
MotionAllMice(_this, evt.x, evt.y);
}
@ -161,8 +160,8 @@ DirectFB_PumpEventsWindow(_THIS)
evt.cy, 0);
SDL_SendMouseButton(devdata->mouse_id[0],
SDL_RELEASED,
DirectFB_TranslateButton
(evt.button));
DirectFB_TranslateButton(evt.
button));
} else {
MotionAllMice(_this, evt.x, evt.y);
}
@ -522,7 +521,6 @@ DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt,
return keysym;
}
static int
DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
{
@ -604,19 +602,18 @@ DirectFB_InitKeyboard(_THIS)
devdata->num_keyboard = 0;
if (devdata->use_linux_input) {
sys_ids = 0;
SDL_DFB_CHECK(devdata->
dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata));
SDL_DFB_CHECK(devdata->dfb->
EnumInputDevices(devdata->dfb, EnumKeyboards, devdata));
if (devdata->num_keyboard == 0) {
sys_ids = 1;
SDL_DFB_CHECK(devdata->
dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata));
SDL_DFB_CHECK(devdata->dfb->
EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata));
}
} else {
SDL_DFB_CHECK(devdata->
dfb->EnumInputDevices(devdata->dfb, input_device_cb,
devdata));
SDL_DFB_CHECK(devdata->dfb->
EnumInputDevices(devdata->dfb, input_device_cb,
devdata));
}
}
@ -653,25 +650,33 @@ DirectFB_PumpEvents(_THIS)
switch (evt.type) {
case DIET_BUTTONPRESS:
posted += SDL_PrivateMouseButton(SDL_PRESSED,
DirectFB_TranslateButton
(evt.button), 0, 0);
DirectFB_TranslateButton(evt.
button),
0, 0);
break;
case DIET_BUTTONRELEASE:
posted += SDL_PrivateMouseButton(SDL_RELEASED,
DirectFB_TranslateButton
(evt.button), 0, 0);
DirectFB_TranslateButton(evt.
button),
0, 0);
break;
case DIET_KEYPRESS:
posted += SDL_PrivateKeyboard(SDL_PRESSED,
DirectFB_TranslateKey
(evt.key_id, evt.key_symbol,
mod, &keysym));
DirectFB_TranslateKey(evt.
key_id,
evt.
key_symbol,
mod,
&keysym));
break;
case DIET_KEYRELEASE:
posted += SDL_PrivateKeyboard(SDL_RELEASED,
DirectFB_TranslateKey
(evt.key_id, evt.key_symbol,
mod, &keysym));
DirectFB_TranslateKey(evt.
key_id,
evt.
key_symbol,
mod,
&keysym));
break;
case DIET_AXISMOTION:
if (evt.flags & DIEF_AXISREL) {

View file

@ -204,9 +204,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags failed;
int ret;
SDL_DFB_CHECKERR(data->
layer->SetCooperativeLevel(data->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(data->layer->
SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE));
config.width = mode->w;
config.height = mode->h;
config.pixelformat = SDLToDFBPixelFormat(mode->format);
@ -217,8 +216,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode)
}
failed = 0;
data->layer->TestConfiguration(data->layer, &config, &failed);
SDL_DFB_CHECKERR(data->
layer->SetCooperativeLevel(data->layer, DLSCL_SHARED));
SDL_DFB_CHECKERR(data->layer->
SetCooperativeLevel(data->layer, DLSCL_SHARED));
if (failed == 0)
SDL_AddDisplayMode(_this->current_display, mode);
else
@ -260,20 +259,19 @@ DirectFB_InitModes(_THIS)
screencbdata->vidlayer[i] = -1;
}
SDL_DFB_CHECKERR(devdata->
dfb->EnumScreens(devdata->dfb, &cbScreens,
screencbdata));
SDL_DFB_CHECKERR(devdata->dfb->
EnumScreens(devdata->dfb, &cbScreens, screencbdata));
for (i = 0; i < screencbdata->numscreens; i++) {
IDirectFBScreen *screen;
SDL_DFB_CHECKERR(devdata->
dfb->GetScreen(devdata->dfb,
screencbdata->screenid[i], &screen));
SDL_DFB_CHECKERR(devdata->dfb->
GetScreen(devdata->dfb, screencbdata->screenid[i],
&screen));
screencbdata->aux = i;
SDL_DFB_CHECKERR(screen->EnumDisplayLayers
(screen, &cbLayers, screencbdata));
SDL_DFB_CHECKERR(screen->
EnumDisplayLayers(screen, &cbLayers, screencbdata));
#if (DIRECTFB_MAJOR_VERSION >= 1)
screen->GetSize(screen, &tcw[i], &tch[i]);
#else
@ -295,12 +293,12 @@ DirectFB_InitModes(_THIS)
SDL_DFB_DEBUG("Found %d screens\n", screencbdata->numscreens);
for (i = 0; i < screencbdata->numscreens; i++) {
SDL_DFB_CHECKERR(devdata->dfb->GetDisplayLayer(devdata->dfb,
screencbdata->
gralayer[i], &layer));
SDL_DFB_CHECKERR(devdata->dfb->
GetDisplayLayer(devdata->dfb,
screencbdata->gralayer[i], &layer));
SDL_DFB_CHECKERR(layer->SetCooperativeLevel
(layer, DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(layer->
SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE));
layer->EnableCursor(layer, 1);
SDL_DFB_CHECKERR(layer->SetCursorOpacity(layer, 0xC0));
@ -383,9 +381,8 @@ DirectFB_GetDisplayModes(_THIS)
data.nummodes = 0;
/* Enumerate the available fullscreen modes */
SDL_DFB_CALLOC(data.modelist, DFB_MAX_MODES, sizeof(SDL_DisplayMode));
SDL_DFB_CHECKERR(devdata->
dfb->EnumVideoModes(devdata->dfb, EnumModesCallback,
&data));
SDL_DFB_CHECKERR(devdata->dfb->
EnumVideoModes(devdata->dfb, EnumModesCallback, &data));
for (i = 0; i < data.nummodes; ++i) {
mode = data.modelist[i];
@ -422,9 +419,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags fail = 0;
DFBResult ret;
SDL_DFB_CHECKERR(data->
layer->SetCooperativeLevel(data->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(data->layer->
SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &config));
config.flags = DLCONF_WIDTH | DLCONF_HEIGHT;
@ -462,8 +458,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
/* Double check */
SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &rconfig));
SDL_DFB_CHECKERR(data->
layer->SetCooperativeLevel(data->layer, DLSCL_SHARED));
SDL_DFB_CHECKERR(data->layer->
SetCooperativeLevel(data->layer, DLSCL_SHARED));
if ((config.width != rconfig.width) ||
(config.height != rconfig.height) ||
@ -506,14 +502,13 @@ DirectFB_QuitModes(_THIS)
(DFB_DisplayData *) _this->displays[i].driverdata;
if (dispdata->layer) {
SDL_DFB_CHECK(dispdata->
layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECK(dispdata->
layer->SetCursorOpacity(dispdata->layer, 0x00));
SDL_DFB_CHECK(dispdata->
layer->SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED));
SDL_DFB_CHECK(dispdata->layer->
SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECK(dispdata->layer->
SetCursorOpacity(dispdata->layer, 0x00));
SDL_DFB_CHECK(dispdata->layer->
SetCooperativeLevel(dispdata->layer, DLSCL_SHARED));
}
SDL_DFB_RELEASE(dispdata->layer);

View file

@ -132,15 +132,14 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
dsc.height = surface->h;
dsc.pixelformat = DSPF_ARGB;
SDL_DFB_CHECKERR(devdata->
dfb->CreateSurface(devdata->dfb, &dsc, &curdata->surf));
SDL_DFB_CHECKERR(devdata->dfb->
CreateSurface(devdata->dfb, &dsc, &curdata->surf));
curdata->hotx = hot_x;
curdata->hoty = hot_y;
cursor->driverdata = curdata;
SDL_DFB_CHECKERR(curdata->
surf->Lock(curdata->surf, DSLF_WRITE, (void *) &dest,
&pitch));
SDL_DFB_CHECKERR(curdata->surf->
Lock(curdata->surf, DSLF_WRITE, (void *) &dest, &pitch));
/* Relies on the fact that this is only called with ARGB surface. */
p = surface->pixels;
@ -175,22 +174,21 @@ DirectFB_ShowCursor(SDL_Cursor * cursor)
DFB_WindowData *windata = (DFB_WindowData *) window->driverdata;
if (cursor)
SDL_DFB_CHECKERR(windata->
window->SetCursorShape(windata->window,
curdata->surf,
curdata->hotx,
curdata->hoty));
SDL_DFB_CHECKERR(windata->window->
SetCursorShape(windata->window,
curdata->surf, curdata->hotx,
curdata->hoty));
/* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */
SDL_DFB_CHECKERR(dispdata->
layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(dispdata->
layer->SetCursorOpacity(dispdata->layer,
cursor ? 0xC0 : 0x00));
SDL_DFB_CHECKERR(dispdata->
layer->SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED));
SDL_DFB_CHECKERR(dispdata->layer->
SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(dispdata->layer->
SetCursorOpacity(dispdata->layer,
cursor ? 0xC0 : 0x00));
SDL_DFB_CHECKERR(dispdata->layer->
SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED));
}
}
@ -229,8 +227,8 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_WindowID windowID, int x, int y)
int cx, cy;
SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy));
SDL_DFB_CHECKERR(dispdata->
layer->WarpCursor(dispdata->layer, cx + x, cy + y));
SDL_DFB_CHECKERR(dispdata->layer->
WarpCursor(dispdata->layer, cx + x, cy + y));
error:
return;

View file

@ -173,8 +173,8 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window)
SDL_DFB_CALLOC(context, 1, sizeof(*context));
SDL_DFB_CHECKERR(windata->
surface->GetGL(windata->surface, &context->context));
SDL_DFB_CHECKERR(windata->surface->
GetGL(windata->surface, &context->context));
if (!context->context)
return NULL;
@ -212,12 +212,12 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
windata->gl_context = NULL;
/* Everything is unlocked, check for a resize */
SDL_DFB_CHECKERR(windata->
surface->GetSize(windata->surface, &cw, &ch));
SDL_DFB_CHECKERR(windata->surface->
GetSize(windata->surface, &cw, &ch));
if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata->
window->ResizeSurface(windata->window, window->w,
window->h));
SDL_DFB_CHECKERR(windata->window->
ResizeSurface(windata->window, window->w,
window->h));
}
if (ctx != NULL) {
@ -266,9 +266,8 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
if (1 || windata->gl_context) {
/* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */
SDL_DFB_CHECKERR(windata->
surface->Flip(windata->surface, &region,
DSFLIP_ONSYNC));
SDL_DFB_CHECKERR(windata->surface->
Flip(windata->surface, &region, DSFLIP_ONSYNC));
/* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */
}

View file

@ -418,12 +418,12 @@ DirectFB_ActivateRenderer(SDL_Renderer * renderer)
int cw, ch;
int ret;
SDL_DFB_CHECKERR(windata->
surface->GetSize(windata->surface, &cw, &ch));
SDL_DFB_CHECKERR(windata->surface->
GetSize(windata->surface, &cw, &ch));
if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata->
window->ResizeSurface(windata->window, window->w,
window->h));
SDL_DFB_CHECKERR(windata->window->
ResizeSurface(windata->window, window->w,
window->h));
}
return 0;
error:
@ -462,24 +462,22 @@ DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture)
layconf.pixelformat = SDLToDFBPixelFormat(data->format);
layconf.surface_caps = DSCAPS_VIDEOONLY | DSCAPS_DOUBLE;
SDL_DFB_CHECKERR(devdata->
dfb->GetDisplayLayer(devdata->dfb, dispdata->vidID,
&dispdata->vidlayer));
SDL_DFB_CHECKERR(dispdata->
vidlayer->SetCooperativeLevel(dispdata->vidlayer,
DLSCL_EXCLUSIVE));
SDL_DFB_CHECKERR(devdata->dfb->
GetDisplayLayer(devdata->dfb, dispdata->vidID,
&dispdata->vidlayer));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SetCooperativeLevel(dispdata->vidlayer,
DLSCL_EXCLUSIVE));
if (devdata->use_yuv_underlays) {
ret = dispdata->vidlayer->SetLevel(dispdata->vidlayer, -1);
if (ret != DFB_OK)
SDL_DFB_DEBUG("Underlay Setlevel not supported\n");
}
SDL_DFB_CHECKERR(dispdata->
vidlayer->SetConfiguration(dispdata->vidlayer,
&layconf));
SDL_DFB_CHECKERR(dispdata->
vidlayer->GetSurface(dispdata->vidlayer,
&data->surface));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SetConfiguration(dispdata->vidlayer, &layconf));
SDL_DFB_CHECKERR(dispdata->vidlayer->
GetSurface(dispdata->vidlayer, &data->surface));
dispdata->vidIDinuse = 1;
data->display = display;
return 0;
@ -488,9 +486,9 @@ DirectFB_AcquireVidLayer(SDL_Renderer * renderer, SDL_Texture * texture)
error:
if (dispdata->vidlayer) {
SDL_DFB_RELEASE(data->surface);
SDL_DFB_CHECKERR(dispdata->
vidlayer->SetCooperativeLevel(dispdata->vidlayer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SetCooperativeLevel(dispdata->vidlayer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_RELEASE(dispdata->vidlayer);
}
return 1;
@ -542,14 +540,12 @@ DirectFB_CreateTexture(SDL_Renderer * renderer, SDL_Texture * texture)
data->pixels = NULL;
/* Create the surface */
SDL_DFB_CHECKERR(devdata->
dfb->CreateSurface(devdata->dfb, &dsc,
&data->surface));
SDL_DFB_CHECKERR(devdata->dfb->
CreateSurface(devdata->dfb, &dsc, &data->surface));
if (SDL_ISPIXELFORMAT_INDEXED(data->format)
&& !SDL_ISPIXELFORMAT_FOURCC(data->format)) {
SDL_DFB_CHECKERR(data->
surface->GetPalette(data->surface,
&data->palette));
SDL_DFB_CHECKERR(data->surface->
GetPalette(data->surface, &data->palette));
}
}
@ -606,9 +602,9 @@ DirectFB_SetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
entries[i].b = colors[i].b;
entries[i].a = 0xFF;
}
SDL_DFB_CHECKERR(data->
palette->SetEntries(data->palette, entries, ncolors,
firstcolor));
SDL_DFB_CHECKERR(data->palette->
SetEntries(data->palette, entries, ncolors,
firstcolor));
return 0;
} else {
SDL_SetError("YUV textures don't have a palette");
@ -630,9 +626,9 @@ DirectFB_GetTexturePalette(SDL_Renderer * renderer, SDL_Texture * texture,
DFBColor entries[256];
int i;
SDL_DFB_CHECKERR(data->
palette->GetEntries(data->palette, entries, ncolors,
firstcolor));
SDL_DFB_CHECKERR(data->palette->
GetEntries(data->palette, entries, ncolors,
firstcolor));
for (i = 0; i < ncolors; ++i) {
colors[i].r = entries[i].r;
@ -811,9 +807,8 @@ PrepareDraw(SDL_Renderer * renderer)
a = renderer->a;
SetBlendMode(data, renderer->blendMode, NULL);
SDL_DFB_CHECKERR(data->
surface->SetDrawingFlags(data->surface,
data->drawFlags));
SDL_DFB_CHECKERR(data->surface->
SetDrawingFlags(data->surface, data->drawFlags));
switch (renderer->blendMode) {
case SDL_BLENDMODE_NONE:
@ -873,9 +868,9 @@ DirectFB_RenderFill(SDL_Renderer * renderer, const SDL_Rect * rect)
DFBResult ret;
PrepareDraw(renderer);
SDL_DFB_CHECKERR(data->
surface->FillRectangle(data->surface, rect->x, rect->y,
rect->w, rect->h));
SDL_DFB_CHECKERR(data->surface->
FillRectangle(data->surface, rect->x, rect->y, rect->w,
rect->h));
return 0;
error:
@ -899,18 +894,15 @@ DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
SDL_VideoDisplay *display = texturedata->display;
DFB_DisplayData *dispdata = (DFB_DisplayData *) display->driverdata;
SDL_DFB_CHECKERR(dispdata->
vidlayer->SetSourceRectangle(dispdata->vidlayer,
srcrect->x, srcrect->y,
srcrect->w,
srcrect->h));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SetSourceRectangle(dispdata->vidlayer, srcrect->x,
srcrect->y, srcrect->w,
srcrect->h));
windata->window->GetPosition(windata->window, &px, &py);
SDL_DFB_CHECKERR(dispdata->
vidlayer->SetScreenRectangle(dispdata->vidlayer,
px + dstrect->x,
py + dstrect->y,
dstrect->w,
dstrect->h));
SDL_DFB_CHECKERR(dispdata->vidlayer->
SetScreenRectangle(dispdata->vidlayer,
px + dstrect->x, py + dstrect->y,
dstrect->w, dstrect->h));
} else {
DFBRectangle sr, dr;
DFBSurfaceBlittingFlags flags = 0;
@ -938,8 +930,9 @@ DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
SDL_DFB_CHECKERR(data->surface->SetColor(data->surface, 0xFF,
0xFF, 0xFF, 0xFF));
if (texture->modMode &
(SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA)) {
if (texture->
modMode & (SDL_TEXTUREMODULATE_COLOR | SDL_TEXTUREMODULATE_ALPHA))
{
if (texture->modMode & SDL_TEXTUREMODULATE_ALPHA) {
alpha = texture->a;
SDL_DFB_CHECKERR(data->surface->SetColor(data->surface, 0xFF,
@ -947,10 +940,9 @@ DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
}
if (texture->modMode & SDL_TEXTUREMODULATE_COLOR) {
SDL_DFB_CHECKERR(data->
surface->SetColor(data->surface, texture->r,
texture->g, texture->b,
alpha));
SDL_DFB_CHECKERR(data->surface->
SetColor(data->surface, texture->r,
texture->g, texture->b, alpha));
flags |= DSBLIT_COLORIZE;
}
if (alpha < 0xFF)
@ -961,25 +953,24 @@ DirectFB_RenderCopy(SDL_Renderer * renderer, SDL_Texture * texture,
SetBlendMode(data, texture->blendMode, texturedata);
SDL_DFB_CHECKERR(data->surface->SetBlittingFlags(data->surface,
data->
blitFlags | flags));
SDL_DFB_CHECKERR(data->surface->
SetBlittingFlags(data->surface,
data->blitFlags | flags));
#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 2)
SDL_DFB_CHECKERR(data->surface->SetRenderOptions(data->surface,
texturedata->render_options));
texturedata->
render_options));
#endif
if (srcrect->w == dstrect->w && srcrect->h == dstrect->h) {
SDL_DFB_CHECKERR(data->
surface->Blit(data->surface,
texturedata->surface, &sr, dr.x,
dr.y));
SDL_DFB_CHECKERR(data->surface->
Blit(data->surface, texturedata->surface,
&sr, dr.x, dr.y));
} else {
SDL_DFB_CHECKERR(data->
surface->StretchBlit(data->surface,
texturedata->surface, &sr,
&dr));
SDL_DFB_CHECKERR(data->surface->
StretchBlit(data->surface, texturedata->surface,
&sr, &dr));
}
}
return 0;
@ -1002,8 +993,8 @@ DirectFB_RenderPresent(SDL_Renderer * renderer)
sr.h = window->h;
/* Send the data to the display */
SDL_DFB_CHECKERR(data->
surface->Flip(data->surface, NULL, data->flipflags));
SDL_DFB_CHECKERR(data->surface->
Flip(data->surface, NULL, data->flipflags));
return;
error:

View file

@ -190,15 +190,14 @@ DirectFB_VideoInit(_THIS)
/* Create global Eventbuffer for axis events */
if (devdata->use_linux_input) {
SDL_DFB_CHECKERR(dfb->CreateInputEventBuffer(dfb, DICAPS_ALL,
DFB_TRUE,
&devdata->events));
SDL_DFB_CHECKERR(dfb->
CreateInputEventBuffer(dfb, DICAPS_ALL,
DFB_TRUE, &devdata->events));
} else {
SDL_DFB_CHECKERR(dfb->CreateInputEventBuffer(dfb,
DICAPS_AXES
/*DICAPS_ALL */ ,
DFB_TRUE,
&devdata->events));
SDL_DFB_CHECKERR(dfb->
CreateInputEventBuffer(dfb,
DICAPS_AXES /*DICAPS_ALL */ ,
DFB_TRUE, &devdata->events));
}
devdata->initialized = 1;

View file

@ -43,11 +43,11 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData));
windata = (DFB_WindowData *) window->driverdata;
SDL_DFB_CHECKERR(devdata->
dfb->SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL));
SDL_DFB_CHECKERR(dispdata->
layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(devdata->dfb->
SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL));
SDL_DFB_CHECKERR(dispdata->layer->
SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE));
/* Fill the window description. */
if (window->x == SDL_WINDOWPOS_CENTERED) {
@ -100,9 +100,8 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
/* DSCAPS_VIDEOONLY has negative impact on performance */
/* Create the window. */
SDL_DFB_CHECKERR(dispdata->
layer->CreateWindow(dispdata->layer, &desc,
&windata->window));
SDL_DFB_CHECKERR(dispdata->layer->
CreateWindow(dispdata->layer, &desc, &windata->window));
windata->window->GetOptions(windata->window, &wopts);
#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0)
@ -120,14 +119,14 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
windata->window->SetOptions(windata->window, wopts);
/* Get the window's surface. */
SDL_DFB_CHECKERR(windata->
window->GetSurface(windata->window, &windata->surface));
SDL_DFB_CHECKERR(windata->window->
GetSurface(windata->window, &windata->surface));
windata->window->SetOpacity(windata->window, 0xFF);
SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window,
&(windata->
eventbuffer)));
SDL_DFB_CHECKERR(windata->
window->EnableEvents(windata->window, DWET_ALL));
SDL_DFB_CHECKERR(windata->window->
CreateEventBuffer(windata->window,
&(windata->eventbuffer)));
SDL_DFB_CHECKERR(windata->window->
EnableEvents(windata->window, DWET_ALL));
if (window->flags & SDL_WINDOW_FULLSCREEN)
windata->window->SetStackingClass(windata->window, DWSC_UPPER);
@ -203,21 +202,19 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window)
int ch;
/* Make sure all events are disabled for this operation ! */
SDL_DFB_CHECKERR(windata->
window->DisableEvents(windata->window, DWET_ALL));
SDL_DFB_CHECKERR(windata->window->
DisableEvents(windata->window, DWET_ALL));
SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &cw, &ch));
if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata->
window->Resize(windata->window, window->w,
window->h));
SDL_DFB_CHECKERR(windata->
window->EnableEvents(windata->window, DWET_ALL));
SDL_DFB_CHECKERR(windata->window->
Resize(windata->window, window->w, window->h));
SDL_DFB_CHECKERR(windata->window->
EnableEvents(windata->window, DWET_ALL));
#else
SDL_DFB_CHECKERR(windata->
window->Resize(windata->window, window->w,
window->h));
SDL_DFB_CHECKERR(windata->window->
Resize(windata->window, window->w, window->h));
#endif
SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &window->w, &window->h)); /* if a window manager should have decided otherwise */