Commit d123950a authored by Sam Lantinga's avatar Sam Lantinga

Reverted Bob's indent checkin

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403475
parent e32916c7
......@@ -156,8 +156,8 @@ SDL_Swap64(Uint64 x)
} v;
v.u = x;
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
"1"(v.
s.b));
"1"(v.s.
b));
return v.u;
}
#elif defined(__GNUC__) && defined(__x86_64__)
......
......@@ -180,8 +180,8 @@ SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
case 's':
len =
SDL_snprintf(msg, maxlen, tmp,
SDL_LookupString(error->
args[argi++].buf));
SDL_LookupString(error->args[argi++].
buf));
msg += len;
maxlen -= len;
break;
......
......@@ -62,8 +62,8 @@ DARTEventFunc(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags)
pBufDesc->iBufferUsage = BUFFER_EMPTY;
// And notify DART feeder thread that it will have to work a bit.
if (pSDLAudioDevice)
DosPostEventSem(pSDLAudioDevice->hidden->
hevAudioBufferPlayed);
DosPostEventSem(pSDLAudioDevice->
hidden->hevAudioBufferPlayed);
}
}
}
......@@ -312,10 +312,11 @@ DART_PlayDevice(_THIS)
(pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf].ulUserParm;
pBufDesc->iBufferUsage = BUFFER_USED;
// Send it to DART to be queued
_this->hidden->MixSetupParms.pmixWrite(_this->hidden->MixSetupParms.
ulMixHandle,
&(_this->hidden->
pMixBuffers[iFreeBuf]), 1);
_this->hidden->MixSetupParms.pmixWrite(_this->hidden->
MixSetupParms.ulMixHandle,
&(_this->
hidden->pMixBuffers[iFreeBuf]),
1);
_this->hidden->iLastPlayedBuf = iFreeBuf;
iFreeBuf = (iFreeBuf + 1) % _this->hidden->iCurrNumBufs;
......@@ -333,8 +334,8 @@ DART_GetDeviceBuf(_THIS)
if (_this->hidden) {
iFreeBuf = _this->hidden->iNextFreeBuffer;
pBufDesc =
(pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf].
ulUserParm;
(pMixBufferDesc) _this->hidden->
pMixBuffers[iFreeBuf].ulUserParm;
if (pBufDesc) {
if (pBufDesc->iBufferUsage == BUFFER_EMPTY) {
......
......@@ -107,8 +107,8 @@ WINWAVEOUT_WaitDevice(_THIS)
Uint8 *
WINWAVEOUT_GetDeviceBuf(_THIS)
{
return (Uint8 *) (this->hidden->wavebuf[this->hidden->next_buffer].
lpData);
return (Uint8 *) (this->hidden->
wavebuf[this->hidden->next_buffer].lpData);
}
void
......
......@@ -278,8 +278,9 @@ DSOUND_GetDeviceBuf(_THIS)
IDirectSoundBuffer_Restore(this->hidden->mixbuf);
result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
this->hidden->mixlen,
(LPVOID *) & this->hidden->
locked_buf, &rawlen, NULL, &junk, 0);
(LPVOID *) & this->
hidden->locked_buf, &rawlen, NULL,
&junk, 0);
}
if (result != DS_OK) {
SetDSerror("DirectSound Lock", result);
......
......@@ -199,8 +199,8 @@ SDL_SYS_HapticInit(void)
CFSTR(kIOHIDPrimaryUsagePageKey));
if (refCF) {
if (!CFNumberGetValue(refCF, kCFNumberLongType,
&SDL_hapticlist
[numhaptics].usagePage))
&SDL_hapticlist[numhaptics].
usagePage))
SDL_SetError
("Haptic: Recieving device's usage page.");
refCF =
......@@ -208,8 +208,8 @@ SDL_SYS_HapticInit(void)
CFSTR(kIOHIDPrimaryUsageKey));
if (refCF) {
if (!CFNumberGetValue(refCF, kCFNumberLongType,
&SDL_hapticlist
[numhaptics].usage))
&SDL_hapticlist[numhaptics].
usage))
SDL_SetError("Haptic: Recieving device's usage.");
}
}
......
......@@ -96,7 +96,6 @@ NDS_EZF_ChipReset()
}
return 0;
}
void
NDS_EZF_SetShake(u8 pos)
{
......
......@@ -212,8 +212,8 @@ EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
/* Get capabilities. */
SDL_hapticlist[SDL_numhaptics].capabilities.dwSize = sizeof(DIDEVCAPS);
ret = IDirectInputDevice_GetCapabilities(device,
&SDL_hapticlist
[SDL_numhaptics].capabilities);
&SDL_hapticlist[SDL_numhaptics].
capabilities);
if (FAILED(ret)) {
/* DI_SetError("Getting device capabilities",ret); */
IDirectInputDevice_Release(device);
......@@ -332,8 +332,8 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance)
/* Now get the IDirectInputDevice2 interface, instead. */
ret = IDirectInputDevice_QueryInterface(device,
&IID_IDirectInputDevice2,
(LPVOID *) & haptic->
hwdata->device);
(LPVOID *) & haptic->hwdata->
device);
/* Done with the temporary one now. */
IDirectInputDevice_Release(device);
if (FAILED(ret)) {
......@@ -500,8 +500,8 @@ int
SDL_SYS_HapticOpen(SDL_Haptic * haptic)
{
return SDL_SYS_HapticOpenFromInstance(haptic,
SDL_hapticlist[haptic->
index].instance);
SDL_hapticlist[haptic->index].
instance);
}
......
......@@ -960,8 +960,8 @@ HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value)
#endif /* USE_LOGICAL_JOYSTICKS */
SDL_PrivateJoystickHat(stick, hat,
position_map[the_hat->axis[1]][the_hat->
axis[0]]);
position_map[the_hat->
axis[1]][the_hat->axis[0]]);
}
}
......@@ -1092,13 +1092,13 @@ EV_HandleEvents(SDL_Joystick * joystick)
code -= BTN_MISC;
#ifndef NO_LOGICAL_JOYSTICKS
if (!LogicalJoystickButton(joystick,
joystick->hwdata->
key_map[code],
joystick->
hwdata->key_map[code],
events[i].value))
#endif
SDL_PrivateJoystickButton(joystick,
joystick->hwdata->
key_map[code],
joystick->
hwdata->key_map[code],
events[i].value);
}
break;
......@@ -1124,8 +1124,8 @@ EV_HandleEvents(SDL_Joystick * joystick)
events[i].value))
#endif
SDL_PrivateJoystickAxis(joystick,
joystick->hwdata->
abs_map[code],
joystick->
hwdata->abs_map[code],
events[i].value);
break;
}
......
This diff is collapsed.
......@@ -616,8 +616,8 @@ search_linked_libs(const struct mach_header *mh, const char *symbol)
|| (LC_LOAD_WEAK_DYLIB == lc->cmd)) {
if ((wh = (struct mach_header *)
my_find_image((char
*) (((struct dylib_command *) lc)->
dylib.name.offset + (char *) lc)))) {
*) (((struct dylib_command *) lc)->dylib.
name.offset + (char *) lc)))) {
if (dyld_NSIsSymbolNameDefinedInImage(wh, symbol)) {
nssym = dyld_NSLookupSymbolInImage(wh,
symbol,
......
......@@ -283,8 +283,8 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info)
amult = alpha | (alpha << 8);
amult = amult | (amult << 16);
chanmask =
(0xff << df->Rshift) | (0xff << df->Gshift) | (0xff << df->
Bshift);
(0xff << df->Rshift) | (0xff << df->
Gshift) | (0xff << df->Bshift);
mm_alpha = _mm_set_pi32(0, amult & chanmask); /* 0000AAAA -> mm_alpha, minus 1 chan */
mm_alpha = _mm_unpacklo_pi8(mm_alpha, mm_zero); /* 0A0A0A0A -> mm_alpha, minus 1 chan */
/* at this point mm_alpha can be 000A0A0A or 0A0A0A00 or another combo */
......@@ -526,8 +526,8 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
/* Use zero for alpha if either surface doesn't have alpha */
if (dstfmt->Amask) {
amask =
((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->
Ashift);
((srcfmt->Amask) ? RESHIFT(srcfmt->
Ashift) : 0x10) << (dstfmt->Ashift);
} else {
amask =
0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
......
......@@ -141,8 +141,8 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt)
/* Use zero for alpha if either surface doesn't have alpha */
if (dstfmt->Amask) {
amask =
((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->
Ashift);
((srcfmt->Amask) ? RESHIFT(srcfmt->
Ashift) : 0x10) << (dstfmt->Ashift);
} else {
amask =
0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
......
......@@ -926,8 +926,8 @@ SetupTextureUpdate(GL_RenderData * renderdata, SDL_Texture * texture,
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH,
(pitch / bytes_per_pixel(texture->format)) /
((GL_TextureData *) texture->
driverdata)->HACK_RYAN_FIXME);
((GL_TextureData *) texture->driverdata)->
HACK_RYAN_FIXME);
}
static int
......
......@@ -479,9 +479,9 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode)
return 0;
}
switch (surface->map->info.
flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD |
SDL_COPY_MOD)) {
switch (surface->map->
info.flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD |
SDL_COPY_MOD)) {
case SDL_COPY_MASK:
*blendMode = SDL_BLENDMODE_MASK;
break;
......
......@@ -349,9 +349,9 @@ SDL_AtariGL_MakeCurrent(_THIS)
}
if (!
(_this->gl_data->
OSMesaMakeCurrent(gl_ctx, surface->pixels, type, surface->w,
surface->h))) {
(_this->
gl_data->OSMesaMakeCurrent(gl_ctx, surface->pixels, type, surface->w,
surface->h))) {
SDL_SetError("Can not make OpenGL context current");
return -1;
}
......@@ -512,11 +512,11 @@ InitNew(_THIS, SDL_Surface * current)
gl_ctx =
_this->gl_data->OSMesaCreateContextExt(osmesa_format,
_this->gl_config.
depth_size,
_this->gl_config.
stencil_size, newaccumsize,
NULL);
_this->
gl_config.depth_size,
_this->
gl_config.stencil_size,
newaccumsize, NULL);
if (gl_ctx) {
gl_curformat = osmesa_format;
......
......@@ -670,8 +670,8 @@ extern "C"
_this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path,
"libGL.so",
SDL_arraysize(_this->gl_config.
driver_path));
SDL_arraysize(_this->
gl_config.driver_path));
}
}
}
......
......@@ -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) {
......
......@@ -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);
......
......@@ -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;
......
......@@ -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)); */
}
......
This diff is collapsed.
......@@ -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;
......
......@@ -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 */
......
......@@ -777,8 +777,8 @@ iPod_UpdateRects(_THIS, int nrects, SDL_Rect * rects)
~(3 << (2 * (x % 4)));
ipod_scr[y * (lcd_width / 4) + x / 4] |=
(((Uint8 *) (SDL_VideoSurface->pixels))[y *
SDL_VideoSurface->pitch
+
SDL_VideoSurface->
pitch +
x] & 3) << (2
*
(x
......
......@@ -440,8 +440,8 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
if ((!pVideo->hidden->pSDLSurface) ||
((pVideo->hidden->pSDLSurface)
&&
((pVideo->hidden->pSDLSurface->
flags & SDL_RESIZABLE) == 0)))
((pVideo->hidden->
pSDLSurface->flags & SDL_RESIZABLE) == 0)))
FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd));
#ifdef DEBUG_BUILD
else
......@@ -690,15 +690,15 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
WinQueryWindowPos(hwnd, &swp);
if ((!pVideo->hidden->pSDLSurface) ||
((pVideo->hidden->pSDLSurface) &&
(pVideo->hidden->pSDLSurface->
flags & SDL_RESIZABLE)
(pVideo->hidden->
pSDLSurface->flags & SDL_RESIZABLE)
&&
((swp.cx !=
pVideo->hidden->SrcBufferDesc.
uiXResolution)
pVideo->hidden->
SrcBufferDesc.uiXResolution)
|| (swp.cy !=
pVideo->hidden->
SrcBufferDesc.uiYResolution))
pVideo->hidden->SrcBufferDesc.
uiYResolution))
&& (!FSLib_QueryFSMode(hwnd)))) {
// Resizable surface and in resizing!
// So, don't blit now!
......@@ -717,10 +717,10 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
FSLIB_BITBLT(hwnd,
pVideo->hidden->pchSrcBuffer, 0,
0,
pVideo->hidden->SrcBufferDesc.
uiXResolution,
pVideo->hidden->
SrcBufferDesc.uiYResolution);
SrcBufferDesc.uiXResolution,
pVideo->hidden->SrcBufferDesc.
uiYResolution);
}
}
#ifdef DEBUG_BUILD
......@@ -2503,21 +2503,26 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
pModeInfoFound->uiXResolution,
pModeInfoFound->uiYResolution,
pModeInfoFound->uiBPP, ((unsigned int)
pModeInfoFound->PixelFormat.ucRedMask)
<< pModeInfoFound->
PixelFormat.ucRedPosition,
((unsigned int)
pModeInfoFound->PixelFormat.ucGreenMask)
<< pModeInfoFound->
PixelFormat.ucGreenPosition,
((unsigned int)
pModeInfoFound->PixelFormat.ucBlueMask)
<< pModeInfoFound->
PixelFormat.ucBluePosition,
((unsigned int)
pModeInfoFound->PixelFormat.ucAlphaMask)
<< pModeInfoFound->
PixelFormat.ucAlphaPosition);
pModeInfoFound->
PixelFormat.
ucRedMask)
<< pModeInfoFound->PixelFormat.
ucRedPosition, ((unsigned int)
pModeInfoFound->
PixelFormat.
ucGreenMask)
<< pModeInfoFound->PixelFormat.
ucGreenPosition, ((unsigned int)
pModeInfoFound->
PixelFormat.
ucBlueMask)
<< pModeInfoFound->PixelFormat.
ucBluePosition, ((unsigned int)
pModeInfoFound->
PixelFormat.
ucAlphaMask)
<< pModeInfoFound->PixelFormat.
ucAlphaPosition);
if (pResult == NULL) {
DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer);
......@@ -2531,23 +2536,27 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
// Adjust pixel format mask!
pResult->format->Rmask =
((unsigned int) pModeInfoFound->PixelFormat.
ucRedMask) << pModeInfoFound->PixelFormat.ucRedPosition;
((unsigned int) pModeInfoFound->
PixelFormat.ucRedMask) << pModeInfoFound->PixelFormat.
ucRedPosition;
pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition;
pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust;
pResult->format->Gmask =
((unsigned int) pModeInfoFound->PixelFormat.
ucGreenMask) << pModeInfoFound->PixelFormat.ucGreenPosition;
((unsigned int) pModeInfoFound->
PixelFormat.ucGreenMask) << pModeInfoFound->PixelFormat.
ucGreenPosition;
pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition;
pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust;
pResult->format->Bmask =
((unsigned int) pModeInfoFound->PixelFormat.
ucBlueMask) << pModeInfoFound->PixelFormat.ucBluePosition;
((unsigned int) pModeInfoFound->
PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat.
ucBluePosition;
pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition;
pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust;
pResult->format->Amask =
((unsigned int) pModeInfoFound->PixelFormat.
ucAlphaMask) << pModeInfoFound->PixelFormat.ucAlphaPosition;
((unsigned int) pModeInfoFound->
PixelFormat.ucAlphaMask) << pModeInfoFound->PixelFormat.
ucAlphaPosition;
pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition;
pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust;
......@@ -2806,23 +2815,25 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat)
vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8;
vformat->Rmask =
((unsigned int) pDesktopMode->PixelFormat.ucRedMask) << pDesktopMode->
PixelFormat.ucRedPosition;
((unsigned int) pDesktopMode->PixelFormat.
ucRedMask) << pDesktopMode->PixelFormat.ucRedPosition;
vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition;
vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust;
vformat->Gmask =
((unsigned int) pDesktopMode->PixelFormat.
ucGreenMask) << pDesktopMode->PixelFormat.ucGreenPosition;
((unsigned int) pDesktopMode->
PixelFormat.ucGreenMask) << pDesktopMode->PixelFormat.
ucGreenPosition;
vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition;
vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust;
vformat->Bmask =
((unsigned int) pDesktopMode->PixelFormat.
ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
((unsigned int) pDesktopMode->
PixelFormat.ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition;
vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust;
vformat->Amask =
((unsigned int) pDesktopMode->PixelFormat.
ucAlphaMask) << pDesktopMode->PixelFormat.ucAlphaPosition;
((unsigned int) pDesktopMode->
PixelFormat.ucAlphaMask) << pDesktopMode->PixelFormat.
ucAlphaPosition;
vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition;
vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust;
......@@ -2927,10 +2938,10 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat)
sizeof(_this->hidden->SrcBufferDesc));
// Allocate new video buffer!
_this->hidden->pchSrcBuffer =
(char *) SDL_malloc(_this->hidden->pAvailableFSLibVideoModes->
uiScanLineSize *
_this->hidden->pAvailableFSLibVideoModes->
uiYResolution);
(char *) SDL_malloc(_this->hidden->
pAvailableFSLibVideoModes->uiScanLineSize *
_this->hidden->
pAvailableFSLibVideoModes->uiYResolution);
if (!_this->hidden->pchSrcBuffer) {
#ifdef DEBUG_BUILD
printf
......
......@@ -314,14 +314,17 @@ ph_SetupOpenGLContext(_THIS, int width, int height, int bpp, Uint32 flags)
&& (this->gl_config.accum_blue_size != 0)
&& (this->gl_config.accum_green_size != 0)) {
qnxgl_attribs_slide = qnxgl_attrib_set_accum(qnxgl_attribs_slide,
this->gl_config.
accum_red_size +
this->gl_config.
accum_blue_size +
this->gl_config.accum_green_size
this->
gl_config.accum_red_size
+
this->
gl_config.accum_alpha_size);
gl_config.accum_blue_size
+
this->
gl_config.
accum_green_size +
this->gl_config.
accum_alpha_size);
}
/* Stereo mode */
......
......@@ -149,8 +149,8 @@ ph_CreateYUVOverlay(_THIS, int width, int height, Uint32 format,
&overlay->hwdata->caps);
if (rtncode == 0) {
if (overlay->hwdata->caps.format == format) {
if ((overlay->hwdata->caps.
flags & Pg_SCALER_CAP_DST_CHROMA_KEY) ==
if ((overlay->hwdata->
caps.flags & Pg_SCALER_CAP_DST_CHROMA_KEY) ==
Pg_SCALER_CAP_DST_CHROMA_KEY) {
overlay->hwdata->ischromakey = 1;
}
......
......@@ -693,8 +693,8 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
result =
IDirect3DDevice9_CreateTexture(renderdata->device, texture->w,
texture->h, 1, 0,
PixelFormatToD3DFMT
(texture->format),
PixelFormatToD3DFMT(texture->
format),
D3DPOOL_SYSTEMMEM, &temp, NULL);
if (FAILED(result)) {
D3D_SetError("CreateTexture()", result);
......
......@@ -114,8 +114,10 @@ WIN_CreateDevice(int devindex)
(UINT(*)(UINT, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
PROCNAME(WTInfoA));
data->WTOpenA =
(HCTX(*)(HWND, LPLOGCONTEXTA, BOOL))
GetProcAddress(data->wintabDLL, PROCNAME(WTOpenA));
(HCTX(*)(HWND, LPLOGCONTEXTA, BOOL)) GetProcAddress(data->
wintabDLL,
PROCNAME
(WTOpenA));
data->WTPacket =
(int (*)(HCTX, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
PROCNAME(WTPacket));
......
......@@ -311,6 +311,7 @@ X11_DispatchEvent(_THIS)
}
continue;
}
#if SDL_VIDEO_DRIVER_X11_XINPUT
data = (X11_MouseData *) mouse->driverdata;
if (xevent.type == data->motion) {
......
......@@ -417,8 +417,8 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display;
int screen =
((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->driverdata)->
screen;
((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->
driverdata)->screen;
XWindowAttributes xattr;
XVisualInfo v, *vinfo;
int n;
......
......@@ -271,7 +271,10 @@ X11_VideoQuit(_THIS)
SDL_bool
X11_UseDirectColorVisuals()
{
return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE;
/* Once we implement DirectColor colormaps and gamma ramp support...
return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE;
*/
return SDL_FALSE;
}
/* vim: set ts=4 sw=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment