Commit 44fa7675 authored by Bob Pendleton's avatar Bob Pendleton

I ran a global "make indent" it modified the following files.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403473
parent d088f9a9
...@@ -156,8 +156,8 @@ SDL_Swap64(Uint64 x) ...@@ -156,8 +156,8 @@ SDL_Swap64(Uint64 x)
} v; } v;
v.u = x; v.u = x;
__asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a), __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
"1"(v.s. "1"(v.
b)); s.b));
return v.u; return v.u;
} }
#elif defined(__GNUC__) && defined(__x86_64__) #elif defined(__GNUC__) && defined(__x86_64__)
......
...@@ -180,8 +180,8 @@ SDL_GetErrorMsg(char *errstr, unsigned int maxlen) ...@@ -180,8 +180,8 @@ SDL_GetErrorMsg(char *errstr, unsigned int maxlen)
case 's': case 's':
len = len =
SDL_snprintf(msg, maxlen, tmp, SDL_snprintf(msg, maxlen, tmp,
SDL_LookupString(error->args[argi++]. SDL_LookupString(error->
buf)); args[argi++].buf));
msg += len; msg += len;
maxlen -= len; maxlen -= len;
break; break;
......
...@@ -62,8 +62,8 @@ DARTEventFunc(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags) ...@@ -62,8 +62,8 @@ DARTEventFunc(ULONG ulStatus, PMCI_MIX_BUFFER pBuffer, ULONG ulFlags)
pBufDesc->iBufferUsage = BUFFER_EMPTY; pBufDesc->iBufferUsage = BUFFER_EMPTY;
// And notify DART feeder thread that it will have to work a bit. // And notify DART feeder thread that it will have to work a bit.
if (pSDLAudioDevice) if (pSDLAudioDevice)
DosPostEventSem(pSDLAudioDevice-> DosPostEventSem(pSDLAudioDevice->hidden->
hidden->hevAudioBufferPlayed); hevAudioBufferPlayed);
} }
} }
} }
...@@ -312,11 +312,10 @@ DART_PlayDevice(_THIS) ...@@ -312,11 +312,10 @@ DART_PlayDevice(_THIS)
(pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf].ulUserParm; (pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf].ulUserParm;
pBufDesc->iBufferUsage = BUFFER_USED; pBufDesc->iBufferUsage = BUFFER_USED;
// Send it to DART to be queued // Send it to DART to be queued
_this->hidden->MixSetupParms.pmixWrite(_this->hidden-> _this->hidden->MixSetupParms.pmixWrite(_this->hidden->MixSetupParms.
MixSetupParms.ulMixHandle, ulMixHandle,
&(_this-> &(_this->hidden->
hidden->pMixBuffers[iFreeBuf]), pMixBuffers[iFreeBuf]), 1);
1);
_this->hidden->iLastPlayedBuf = iFreeBuf; _this->hidden->iLastPlayedBuf = iFreeBuf;
iFreeBuf = (iFreeBuf + 1) % _this->hidden->iCurrNumBufs; iFreeBuf = (iFreeBuf + 1) % _this->hidden->iCurrNumBufs;
...@@ -334,8 +333,8 @@ DART_GetDeviceBuf(_THIS) ...@@ -334,8 +333,8 @@ DART_GetDeviceBuf(_THIS)
if (_this->hidden) { if (_this->hidden) {
iFreeBuf = _this->hidden->iNextFreeBuffer; iFreeBuf = _this->hidden->iNextFreeBuffer;
pBufDesc = pBufDesc =
(pMixBufferDesc) _this->hidden-> (pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf].
pMixBuffers[iFreeBuf].ulUserParm; ulUserParm;
if (pBufDesc) { if (pBufDesc) {
if (pBufDesc->iBufferUsage == BUFFER_EMPTY) { if (pBufDesc->iBufferUsage == BUFFER_EMPTY) {
......
...@@ -107,8 +107,8 @@ WINWAVEOUT_WaitDevice(_THIS) ...@@ -107,8 +107,8 @@ WINWAVEOUT_WaitDevice(_THIS)
Uint8 * Uint8 *
WINWAVEOUT_GetDeviceBuf(_THIS) WINWAVEOUT_GetDeviceBuf(_THIS)
{ {
return (Uint8 *) (this->hidden-> return (Uint8 *) (this->hidden->wavebuf[this->hidden->next_buffer].
wavebuf[this->hidden->next_buffer].lpData); lpData);
} }
void void
......
...@@ -278,9 +278,8 @@ DSOUND_GetDeviceBuf(_THIS) ...@@ -278,9 +278,8 @@ DSOUND_GetDeviceBuf(_THIS)
IDirectSoundBuffer_Restore(this->hidden->mixbuf); IDirectSoundBuffer_Restore(this->hidden->mixbuf);
result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor, result = IDirectSoundBuffer_Lock(this->hidden->mixbuf, cursor,
this->hidden->mixlen, this->hidden->mixlen,
(LPVOID *) & this-> (LPVOID *) & this->hidden->
hidden->locked_buf, &rawlen, NULL, locked_buf, &rawlen, NULL, &junk, 0);
&junk, 0);
} }
if (result != DS_OK) { if (result != DS_OK) {
SetDSerror("DirectSound Lock", result); SetDSerror("DirectSound Lock", result);
......
...@@ -199,8 +199,8 @@ SDL_SYS_HapticInit(void) ...@@ -199,8 +199,8 @@ SDL_SYS_HapticInit(void)
CFSTR(kIOHIDPrimaryUsagePageKey)); CFSTR(kIOHIDPrimaryUsagePageKey));
if (refCF) { if (refCF) {
if (!CFNumberGetValue(refCF, kCFNumberLongType, if (!CFNumberGetValue(refCF, kCFNumberLongType,
&SDL_hapticlist[numhaptics]. &SDL_hapticlist
usagePage)) [numhaptics].usagePage))
SDL_SetError SDL_SetError
("Haptic: Recieving device's usage page."); ("Haptic: Recieving device's usage page.");
refCF = refCF =
...@@ -208,8 +208,8 @@ SDL_SYS_HapticInit(void) ...@@ -208,8 +208,8 @@ SDL_SYS_HapticInit(void)
CFSTR(kIOHIDPrimaryUsageKey)); CFSTR(kIOHIDPrimaryUsageKey));
if (refCF) { if (refCF) {
if (!CFNumberGetValue(refCF, kCFNumberLongType, if (!CFNumberGetValue(refCF, kCFNumberLongType,
&SDL_hapticlist[numhaptics]. &SDL_hapticlist
usage)) [numhaptics].usage))
SDL_SetError("Haptic: Recieving device's usage."); SDL_SetError("Haptic: Recieving device's usage.");
} }
} }
......
...@@ -96,6 +96,7 @@ NDS_EZF_ChipReset() ...@@ -96,6 +96,7 @@ NDS_EZF_ChipReset()
} }
return 0; return 0;
} }
void void
NDS_EZF_SetShake(u8 pos) NDS_EZF_SetShake(u8 pos)
{ {
......
...@@ -212,8 +212,8 @@ EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext) ...@@ -212,8 +212,8 @@ EnumHapticsCallback(const DIDEVICEINSTANCE * pdidInstance, VOID * pContext)
/* Get capabilities. */ /* Get capabilities. */
SDL_hapticlist[SDL_numhaptics].capabilities.dwSize = sizeof(DIDEVCAPS); SDL_hapticlist[SDL_numhaptics].capabilities.dwSize = sizeof(DIDEVCAPS);
ret = IDirectInputDevice_GetCapabilities(device, ret = IDirectInputDevice_GetCapabilities(device,
&SDL_hapticlist[SDL_numhaptics]. &SDL_hapticlist
capabilities); [SDL_numhaptics].capabilities);
if (FAILED(ret)) { if (FAILED(ret)) {
/* DI_SetError("Getting device capabilities",ret); */ /* DI_SetError("Getting device capabilities",ret); */
IDirectInputDevice_Release(device); IDirectInputDevice_Release(device);
...@@ -332,8 +332,8 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance) ...@@ -332,8 +332,8 @@ SDL_SYS_HapticOpenFromInstance(SDL_Haptic * haptic, DIDEVICEINSTANCE instance)
/* Now get the IDirectInputDevice2 interface, instead. */ /* Now get the IDirectInputDevice2 interface, instead. */
ret = IDirectInputDevice_QueryInterface(device, ret = IDirectInputDevice_QueryInterface(device,
&IID_IDirectInputDevice2, &IID_IDirectInputDevice2,
(LPVOID *) & haptic->hwdata-> (LPVOID *) & haptic->
device); hwdata->device);
/* Done with the temporary one now. */ /* Done with the temporary one now. */
IDirectInputDevice_Release(device); IDirectInputDevice_Release(device);
if (FAILED(ret)) { if (FAILED(ret)) {
...@@ -500,8 +500,8 @@ int ...@@ -500,8 +500,8 @@ int
SDL_SYS_HapticOpen(SDL_Haptic * haptic) SDL_SYS_HapticOpen(SDL_Haptic * haptic)
{ {
return SDL_SYS_HapticOpenFromInstance(haptic, return SDL_SYS_HapticOpenFromInstance(haptic,
SDL_hapticlist[haptic->index]. SDL_hapticlist[haptic->
instance); index].instance);
} }
......
...@@ -960,8 +960,8 @@ HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value) ...@@ -960,8 +960,8 @@ HandleHat(SDL_Joystick * stick, Uint8 hat, int axis, int value)
#endif /* USE_LOGICAL_JOYSTICKS */ #endif /* USE_LOGICAL_JOYSTICKS */
SDL_PrivateJoystickHat(stick, hat, SDL_PrivateJoystickHat(stick, hat,
position_map[the_hat-> position_map[the_hat->axis[1]][the_hat->
axis[1]][the_hat->axis[0]]); axis[0]]);
} }
} }
...@@ -1092,13 +1092,13 @@ EV_HandleEvents(SDL_Joystick * joystick) ...@@ -1092,13 +1092,13 @@ EV_HandleEvents(SDL_Joystick * joystick)
code -= BTN_MISC; code -= BTN_MISC;
#ifndef NO_LOGICAL_JOYSTICKS #ifndef NO_LOGICAL_JOYSTICKS
if (!LogicalJoystickButton(joystick, if (!LogicalJoystickButton(joystick,
joystick-> joystick->hwdata->
hwdata->key_map[code], key_map[code],
events[i].value)) events[i].value))
#endif #endif
SDL_PrivateJoystickButton(joystick, SDL_PrivateJoystickButton(joystick,
joystick-> joystick->hwdata->
hwdata->key_map[code], key_map[code],
events[i].value); events[i].value);
} }
break; break;
...@@ -1124,8 +1124,8 @@ EV_HandleEvents(SDL_Joystick * joystick) ...@@ -1124,8 +1124,8 @@ EV_HandleEvents(SDL_Joystick * joystick)
events[i].value)) events[i].value))
#endif #endif
SDL_PrivateJoystickAxis(joystick, SDL_PrivateJoystickAxis(joystick,
joystick-> joystick->hwdata->
hwdata->abs_map[code], abs_map[code],
events[i].value); events[i].value);
break; break;
} }
......
This diff is collapsed.
...@@ -616,8 +616,8 @@ search_linked_libs(const struct mach_header *mh, const char *symbol) ...@@ -616,8 +616,8 @@ search_linked_libs(const struct mach_header *mh, const char *symbol)
|| (LC_LOAD_WEAK_DYLIB == lc->cmd)) { || (LC_LOAD_WEAK_DYLIB == lc->cmd)) {
if ((wh = (struct mach_header *) if ((wh = (struct mach_header *)
my_find_image((char my_find_image((char
*) (((struct dylib_command *) lc)->dylib. *) (((struct dylib_command *) lc)->
name.offset + (char *) lc)))) { dylib.name.offset + (char *) lc)))) {
if (dyld_NSIsSymbolNameDefinedInImage(wh, symbol)) { if (dyld_NSIsSymbolNameDefinedInImage(wh, symbol)) {
nssym = dyld_NSLookupSymbolInImage(wh, nssym = dyld_NSLookupSymbolInImage(wh,
symbol, symbol,
......
...@@ -283,8 +283,8 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info) ...@@ -283,8 +283,8 @@ BlitRGBtoRGBSurfaceAlphaMMX(SDL_BlitInfo * info)
amult = alpha | (alpha << 8); amult = alpha | (alpha << 8);
amult = amult | (amult << 16); amult = amult | (amult << 16);
chanmask = chanmask =
(0xff << df->Rshift) | (0xff << df-> (0xff << df->Rshift) | (0xff << df->Gshift) | (0xff << df->
Gshift) | (0xff << df->Bshift); Bshift);
mm_alpha = _mm_set_pi32(0, amult & chanmask); /* 0000AAAA -> mm_alpha, minus 1 chan */ 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 */ 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 */ /* 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) ...@@ -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 */ /* Use zero for alpha if either surface doesn't have alpha */
if (dstfmt->Amask) { if (dstfmt->Amask) {
amask = amask =
((srcfmt->Amask) ? RESHIFT(srcfmt-> ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->
Ashift) : 0x10) << (dstfmt->Ashift); Ashift);
} else { } else {
amask = amask =
0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
......
...@@ -141,8 +141,8 @@ calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) ...@@ -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 */ /* Use zero for alpha if either surface doesn't have alpha */
if (dstfmt->Amask) { if (dstfmt->Amask) {
amask = amask =
((srcfmt->Amask) ? RESHIFT(srcfmt-> ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->
Ashift) : 0x10) << (dstfmt->Ashift); Ashift);
} else { } else {
amask = amask =
0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^
......
...@@ -926,8 +926,8 @@ SetupTextureUpdate(GL_RenderData * renderdata, SDL_Texture * texture, ...@@ -926,8 +926,8 @@ SetupTextureUpdate(GL_RenderData * renderdata, SDL_Texture * texture,
renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1); renderdata->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH, renderdata->glPixelStorei(GL_UNPACK_ROW_LENGTH,
(pitch / bytes_per_pixel(texture->format)) / (pitch / bytes_per_pixel(texture->format)) /
((GL_TextureData *) texture->driverdata)-> ((GL_TextureData *) texture->
HACK_RYAN_FIXME); driverdata)->HACK_RYAN_FIXME);
} }
static int static int
......
...@@ -479,9 +479,9 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode) ...@@ -479,9 +479,9 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode)
return 0; return 0;
} }
switch (surface->map-> switch (surface->map->info.
info.flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD |
SDL_COPY_MOD)) { SDL_COPY_MOD)) {
case SDL_COPY_MASK: case SDL_COPY_MASK:
*blendMode = SDL_BLENDMODE_MASK; *blendMode = SDL_BLENDMODE_MASK;
break; break;
......
...@@ -349,9 +349,9 @@ SDL_AtariGL_MakeCurrent(_THIS) ...@@ -349,9 +349,9 @@ SDL_AtariGL_MakeCurrent(_THIS)
} }
if (! if (!
(_this-> (_this->gl_data->
gl_data->OSMesaMakeCurrent(gl_ctx, surface->pixels, type, surface->w, OSMesaMakeCurrent(gl_ctx, surface->pixels, type, surface->w,
surface->h))) { surface->h))) {
SDL_SetError("Can not make OpenGL context current"); SDL_SetError("Can not make OpenGL context current");
return -1; return -1;
} }
...@@ -512,11 +512,11 @@ InitNew(_THIS, SDL_Surface * current) ...@@ -512,11 +512,11 @@ InitNew(_THIS, SDL_Surface * current)
gl_ctx = gl_ctx =
_this->gl_data->OSMesaCreateContextExt(osmesa_format, _this->gl_data->OSMesaCreateContextExt(osmesa_format,
_this-> _this->gl_config.
gl_config.depth_size, depth_size,
_this-> _this->gl_config.
gl_config.stencil_size, stencil_size, newaccumsize,
newaccumsize, NULL); NULL);
if (gl_ctx) { if (gl_ctx) {
gl_curformat = osmesa_format; gl_curformat = osmesa_format;
......
...@@ -670,8 +670,8 @@ extern "C" ...@@ -670,8 +670,8 @@ extern "C"
_this->gl_config.driver_loaded = 1; _this->gl_config.driver_loaded = 1;
SDL_strlcpy(_this->gl_config.driver_path, SDL_strlcpy(_this->gl_config.driver_path,
"libGL.so", "libGL.so",
SDL_arraysize(_this-> SDL_arraysize(_this->gl_config.
gl_config.driver_path)); driver_path));
} }
} }
} }
......
...@@ -60,8 +60,9 @@ DirectFB_SetContext(_THIS, SDL_WindowID id) ...@@ -60,8 +60,9 @@ DirectFB_SetContext(_THIS, SDL_WindowID id)
int ret; int ret;
if (dispdata->vidIDinuse) if (dispdata->vidIDinuse)
SDL_DFB_CHECKERR(dispdata->vidlayer-> SDL_DFB_CHECKERR(dispdata->
SwitchContext(dispdata->vidlayer, DFB_TRUE)); vidlayer->SwitchContext(dispdata->vidlayer,
DFB_TRUE));
error: error:
return; return;
...@@ -148,8 +149,8 @@ DirectFB_PumpEventsWindow(_THIS) ...@@ -148,8 +149,8 @@ DirectFB_PumpEventsWindow(_THIS)
SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx, SDL_SendMouseMotion(devdata->mouse_id[0], 0, evt.cx,
evt.cy, 0); evt.cy, 0);
SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED, SDL_SendMouseButton(devdata->mouse_id[0], SDL_PRESSED,
DirectFB_TranslateButton(evt. DirectFB_TranslateButton
button)); (evt.button));
} else { } else {
MotionAllMice(_this, evt.x, evt.y); MotionAllMice(_this, evt.x, evt.y);
} }
...@@ -160,8 +161,8 @@ DirectFB_PumpEventsWindow(_THIS) ...@@ -160,8 +161,8 @@ DirectFB_PumpEventsWindow(_THIS)
evt.cy, 0); evt.cy, 0);
SDL_SendMouseButton(devdata->mouse_id[0], SDL_SendMouseButton(devdata->mouse_id[0],
SDL_RELEASED, SDL_RELEASED,
DirectFB_TranslateButton(evt. DirectFB_TranslateButton
button)); (evt.button));
} else { } else {
MotionAllMice(_this, evt.x, evt.y); MotionAllMice(_this, evt.x, evt.y);
} }
...@@ -521,6 +522,7 @@ DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt, ...@@ -521,6 +522,7 @@ DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt,
return keysym; return keysym;
} }
static int static int
DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
{ {
...@@ -602,18 +604,19 @@ DirectFB_InitKeyboard(_THIS) ...@@ -602,18 +604,19 @@ DirectFB_InitKeyboard(_THIS)
devdata->num_keyboard = 0; devdata->num_keyboard = 0;
if (devdata->use_linux_input) { if (devdata->use_linux_input) {
sys_ids = 0; sys_ids = 0;
SDL_DFB_CHECK(devdata->dfb-> SDL_DFB_CHECK(devdata->
EnumInputDevices(devdata->dfb, EnumKeyboards, devdata)); dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata));
if (devdata->num_keyboard == 0) { if (devdata->num_keyboard == 0) {
sys_ids = 1; sys_ids = 1;
SDL_DFB_CHECK(devdata->dfb-> SDL_DFB_CHECK(devdata->
EnumInputDevices(devdata->dfb, EnumKeyboards, dfb->EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata)); devdata));
} }
} else { } else {
SDL_DFB_CHECK(devdata->dfb-> SDL_DFB_CHECK(devdata->
EnumInputDevices(devdata->dfb, input_device_cb, dfb->EnumInputDevices(devdata->dfb, input_device_cb,
devdata)); devdata));
} }
} }
...@@ -650,33 +653,25 @@ DirectFB_PumpEvents(_THIS) ...@@ -650,33 +653,25 @@ DirectFB_PumpEvents(_THIS)
switch (evt.type) { switch (evt.type) {
case DIET_BUTTONPRESS: case DIET_BUTTONPRESS:
posted += SDL_PrivateMouseButton(SDL_PRESSED, posted += SDL_PrivateMouseButton(SDL_PRESSED,
DirectFB_TranslateButton(evt. DirectFB_TranslateButton
button), (evt.button), 0, 0);
0, 0);
break; break;
case DIET_BUTTONRELEASE: case DIET_BUTTONRELEASE:
posted += SDL_PrivateMouseButton(SDL_RELEASED, posted += SDL_PrivateMouseButton(SDL_RELEASED,
DirectFB_TranslateButton(evt. DirectFB_TranslateButton
button), (evt.button), 0, 0);
0, 0);
break; break;
case DIET_KEYPRESS: case DIET_KEYPRESS:
posted += SDL_PrivateKeyboard(SDL_PRESSED, posted += SDL_PrivateKeyboard(SDL_PRESSED,
DirectFB_TranslateKey(evt. DirectFB_TranslateKey
key_id, (evt.key_id, evt.key_symbol,
evt. mod, &keysym));
key_symbol,
mod,
&keysym));
break; break;
case DIET_KEYRELEASE: case DIET_KEYRELEASE:
posted += SDL_PrivateKeyboard(SDL_RELEASED, posted += SDL_PrivateKeyboard(SDL_RELEASED,
DirectFB_TranslateKey(evt. DirectFB_TranslateKey
key_id, (evt.key_id, evt.key_symbol,
evt. mod, &keysym));
key_symbol,
mod,
&keysym));
break; break;
case DIET_AXISMOTION: case DIET_AXISMOTION:
if (evt.flags & DIEF_AXISREL) { if (evt.flags & DIEF_AXISREL) {
......
...@@ -204,8 +204,9 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode) ...@@ -204,8 +204,9 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags failed; DFBDisplayLayerConfigFlags failed;
int ret; int ret;
SDL_DFB_CHECKERR(data->layer-> SDL_DFB_CHECKERR(data->
SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE)); layer->SetCooperativeLevel(data->layer,
DLSCL_ADMINISTRATIVE));
config.width = mode->w; config.width = mode->w;
config.height = mode->h; config.height = mode->h;
config.pixelformat = SDLToDFBPixelFormat(mode->format); config.pixelformat = SDLToDFBPixelFormat(mode->format);
...@@ -216,8 +217,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode) ...@@ -216,8 +217,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode)
} }
failed = 0; failed = 0;
data->layer->TestConfiguration(data->layer, &config, &failed); data->layer->TestConfiguration(data->layer, &config, &failed);
SDL_DFB_CHECKERR(data->layer-> SDL_DFB_CHECKERR(data->
SetCooperativeLevel(data->layer, DLSCL_SHARED)); layer->SetCooperativeLevel(data->layer, DLSCL_SHARED));
if (failed == 0) if (failed == 0)
SDL_AddDisplayMode(_this->current_display, mode); SDL_AddDisplayMode(_this->current_display, mode);
else else
...@@ -259,19 +260,20 @@ DirectFB_InitModes(_THIS) ...@@ -259,19 +260,20 @@ DirectFB_InitModes(_THIS)
screencbdata->vidlayer[i] = -1; screencbdata->vidlayer[i] = -1;
} }
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->
EnumScreens(devdata->dfb, &cbScreens, screencbdata)); dfb->EnumScreens(devdata->dfb, &cbScreens,
screencbdata));
for (i = 0; i < screencbdata->numscreens; i++) { for (i = 0; i < screencbdata->numscreens; i++) {
IDirectFBScreen *screen; IDirectFBScreen *screen;
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->
GetScreen(devdata->dfb, screencbdata->screenid[i], dfb->GetScreen(devdata->dfb,
&screen)); screencbdata->screenid[i], &screen));
screencbdata->aux = i; screencbdata->aux = i;
SDL_DFB_CHECKERR(screen-> SDL_DFB_CHECKERR(screen->EnumDisplayLayers
EnumDisplayLayers(screen, &cbLayers, screencbdata)); (screen, &cbLayers, screencbdata));
#if (DIRECTFB_MAJOR_VERSION >= 1) #if (DIRECTFB_MAJOR_VERSION >= 1)
screen->GetSize(screen, &tcw[i], &tch[i]); screen->GetSize(screen, &tcw[i], &tch[i]);
#else #else
...@@ -293,12 +295,12 @@ DirectFB_InitModes(_THIS) ...@@ -293,12 +295,12 @@ DirectFB_InitModes(_THIS)
SDL_DFB_DEBUG("Found %d screens\n", screencbdata->numscreens); SDL_DFB_DEBUG("Found %d screens\n", screencbdata->numscreens);
for (i = 0; i < screencbdata->numscreens; i++) { for (i = 0; i < screencbdata->numscreens; i++) {
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->dfb->GetDisplayLayer(devdata->dfb,
GetDisplayLayer(devdata->dfb, screencbdata->
screencbdata->gralayer[i], &layer)); gralayer[i], &layer));
SDL_DFB_CHECKERR(layer-> SDL_DFB_CHECKERR(layer->SetCooperativeLevel
SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE)); (layer, DLSCL_ADMINISTRATIVE));
layer->EnableCursor(layer, 1); layer->EnableCursor(layer, 1);
SDL_DFB_CHECKERR(layer->SetCursorOpacity(layer, 0xC0)); SDL_DFB_CHECKERR(layer->SetCursorOpacity(layer, 0xC0));
...@@ -381,8 +383,9 @@ DirectFB_GetDisplayModes(_THIS) ...@@ -381,8 +383,9 @@ DirectFB_GetDisplayModes(_THIS)
data.nummodes = 0; data.nummodes = 0;
/* Enumerate the available fullscreen modes */ /* Enumerate the available fullscreen modes */
SDL_DFB_CALLOC(data.modelist, DFB_MAX_MODES, sizeof(SDL_DisplayMode)); SDL_DFB_CALLOC(data.modelist, DFB_MAX_MODES, sizeof(SDL_DisplayMode));
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->
EnumVideoModes(devdata->dfb, EnumModesCallback, &data)); dfb->EnumVideoModes(devdata->dfb, EnumModesCallback,
&data));
for (i = 0; i < data.nummodes; ++i) { for (i = 0; i < data.nummodes; ++i) {
mode = data.modelist[i]; mode = data.modelist[i];
...@@ -419,8 +422,9 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -419,8 +422,9 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags fail = 0; DFBDisplayLayerConfigFlags fail = 0;
DFBResult ret; DFBResult ret;
SDL_DFB_CHECKERR(data->layer-> SDL_DFB_CHECKERR(data->
SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE)); layer->SetCooperativeLevel(data->layer,
DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &config)); SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &config));
config.flags = DLCONF_WIDTH | DLCONF_HEIGHT; config.flags = DLCONF_WIDTH | DLCONF_HEIGHT;
...@@ -458,8 +462,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -458,8 +462,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
/* Double check */ /* Double check */
SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &rconfig)); SDL_DFB_CHECKERR(data->layer->GetConfiguration(data->layer, &rconfig));
SDL_DFB_CHECKERR(data->layer-> SDL_DFB_CHECKERR(data->
SetCooperativeLevel(data->layer, DLSCL_SHARED)); layer->SetCooperativeLevel(data->layer, DLSCL_SHARED));
if ((config.width != rconfig.width) || if ((config.width != rconfig.width) ||
(config.height != rconfig.height) || (config.height != rconfig.height) ||
...@@ -502,13 +506,14 @@ DirectFB_QuitModes(_THIS) ...@@ -502,13 +506,14 @@ DirectFB_QuitModes(_THIS)
(DFB_DisplayData *) _this->displays[i].driverdata; (DFB_DisplayData *) _this->displays[i].driverdata;
if (dispdata->layer) { if (dispdata->layer) {
SDL_DFB_CHECK(dispdata->layer-> SDL_DFB_CHECK(dispdata->
SetCooperativeLevel(dispdata->layer, layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECK(dispdata->layer-> SDL_DFB_CHECK(dispdata->
SetCursorOpacity(dispdata->layer, 0x00)); layer->SetCursorOpacity(dispdata->layer, 0x00));
SDL_DFB_CHECK(dispdata->layer-> SDL_DFB_CHECK(dispdata->
SetCooperativeLevel(dispdata->layer, DLSCL_SHARED)); layer->SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED));
} }
SDL_DFB_RELEASE(dispdata->layer); SDL_DFB_RELEASE(dispdata->layer);
......
...@@ -132,14 +132,15 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) ...@@ -132,14 +132,15 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y)
dsc.height = surface->h; dsc.height = surface->h;
dsc.pixelformat = DSPF_ARGB; dsc.pixelformat = DSPF_ARGB;
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->
CreateSurface(devdata->dfb, &dsc, &curdata->surf)); dfb->CreateSurface(devdata->dfb, &dsc, &curdata->surf));
curdata->hotx = hot_x; curdata->hotx = hot_x;
curdata->hoty = hot_y; curdata->hoty = hot_y;
cursor->driverdata = curdata; cursor->driverdata = curdata;
SDL_DFB_CHECKERR(curdata->surf-> SDL_DFB_CHECKERR(curdata->
Lock(curdata->surf, DSLF_WRITE, (void *) &dest, &pitch)); surf->Lock(curdata->surf, DSLF_WRITE, (void *) &dest,
&pitch));
/* Relies on the fact that this is only called with ARGB surface. */ /* Relies on the fact that this is only called with ARGB surface. */
p = surface->pixels; p = surface->pixels;
...@@ -174,21 +175,22 @@ DirectFB_ShowCursor(SDL_Cursor * cursor) ...@@ -174,21 +175,22 @@ DirectFB_ShowCursor(SDL_Cursor * cursor)
DFB_WindowData *windata = (DFB_WindowData *) window->driverdata; DFB_WindowData *windata = (DFB_WindowData *) window->driverdata;
if (cursor) if (cursor)
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
SetCursorShape(windata->window, window->SetCursorShape(windata->window,
curdata->surf, curdata->hotx, curdata->surf,
curdata->hoty)); curdata->hotx,
curdata->hoty));
/* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */ /* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
SetCooperativeLevel(dispdata->layer, layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
SetCursorOpacity(dispdata->layer, layer->SetCursorOpacity(dispdata->layer,
cursor ? 0xC0 : 0x00)); cursor ? 0xC0 : 0x00));
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
SetCooperativeLevel(dispdata->layer, layer->SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED)); DLSCL_SHARED));
} }
} }
...@@ -227,8 +229,8 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_WindowID windowID, int x, int y) ...@@ -227,8 +229,8 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_WindowID windowID, int x, int y)
int cx, cy; int cx, cy;
SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy)); SDL_DFB_CHECKERR(windata->window->GetPosition(windata->window, &cx, &cy));
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
WarpCursor(dispdata->layer, cx + x, cy + y)); layer->WarpCursor(dispdata->layer, cx + x, cy + y));
error: error:
return; return;
......
...@@ -173,8 +173,8 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window) ...@@ -173,8 +173,8 @@ DirectFB_GL_CreateContext(_THIS, SDL_Window * window)
SDL_DFB_CALLOC(context, 1, sizeof(*context)); SDL_DFB_CALLOC(context, 1, sizeof(*context));
SDL_DFB_CHECKERR(windata->surface-> SDL_DFB_CHECKERR(windata->
GetGL(windata->surface, &context->context)); surface->GetGL(windata->surface, &context->context));
if (!context->context) if (!context->context)
return NULL; return NULL;
...@@ -212,12 +212,12 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) ...@@ -212,12 +212,12 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context)
windata->gl_context = NULL; windata->gl_context = NULL;
/* Everything is unlocked, check for a resize */ /* Everything is unlocked, check for a resize */
SDL_DFB_CHECKERR(windata->surface-> SDL_DFB_CHECKERR(windata->
GetSize(windata->surface, &cw, &ch)); surface->GetSize(windata->surface, &cw, &ch));
if (cw != window->w || ch != window->h) if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
ResizeSurface(windata->window, window->w, window->ResizeSurface(windata->window, window->w,
window->h)); window->h));
} }
if (ctx != NULL) { if (ctx != NULL) {
...@@ -266,8 +266,9 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) ...@@ -266,8 +266,9 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window)
if (1 || windata->gl_context) { if (1 || windata->gl_context) {
/* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */ /* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */
SDL_DFB_CHECKERR(windata->surface-> SDL_DFB_CHECKERR(windata->
Flip(windata->surface, &region, DSFLIP_ONSYNC)); surface->Flip(windata->surface, &region,
DSFLIP_ONSYNC));
/* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */ /* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */
} }
......
This diff is collapsed.
...@@ -190,14 +190,15 @@ DirectFB_VideoInit(_THIS) ...@@ -190,14 +190,15 @@ DirectFB_VideoInit(_THIS)
/* Create global Eventbuffer for axis events */ /* Create global Eventbuffer for axis events */
if (devdata->use_linux_input) { if (devdata->use_linux_input) {
SDL_DFB_CHECKERR(dfb-> SDL_DFB_CHECKERR(dfb->CreateInputEventBuffer(dfb, DICAPS_ALL,
CreateInputEventBuffer(dfb, DICAPS_ALL, DFB_TRUE,
DFB_TRUE, &devdata->events)); &devdata->events));
} else { } else {
SDL_DFB_CHECKERR(dfb-> SDL_DFB_CHECKERR(dfb->CreateInputEventBuffer(dfb,
CreateInputEventBuffer(dfb, DICAPS_AXES
DICAPS_AXES /*DICAPS_ALL */ , /*DICAPS_ALL */ ,
DFB_TRUE, &devdata->events)); DFB_TRUE,
&devdata->events));
} }
devdata->initialized = 1; devdata->initialized = 1;
......
...@@ -43,11 +43,11 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -43,11 +43,11 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData)); SDL_DFB_CALLOC(window->driverdata, 1, sizeof(DFB_WindowData));
windata = (DFB_WindowData *) window->driverdata; windata = (DFB_WindowData *) window->driverdata;
SDL_DFB_CHECKERR(devdata->dfb-> SDL_DFB_CHECKERR(devdata->
SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL)); dfb->SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL));
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
SetCooperativeLevel(dispdata->layer, layer->SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
/* Fill the window description. */ /* Fill the window description. */
if (window->x == SDL_WINDOWPOS_CENTERED) { if (window->x == SDL_WINDOWPOS_CENTERED) {
...@@ -100,8 +100,9 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -100,8 +100,9 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
/* DSCAPS_VIDEOONLY has negative impact on performance */ /* DSCAPS_VIDEOONLY has negative impact on performance */
/* Create the window. */ /* Create the window. */
SDL_DFB_CHECKERR(dispdata->layer-> SDL_DFB_CHECKERR(dispdata->
CreateWindow(dispdata->layer, &desc, &windata->window)); layer->CreateWindow(dispdata->layer, &desc,
&windata->window));
windata->window->GetOptions(windata->window, &wopts); windata->window->GetOptions(windata->window, &wopts);
#if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0) #if (DIRECTFB_MAJOR_VERSION == 1) && (DIRECTFB_MINOR_VERSION >= 0)
...@@ -119,14 +120,14 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -119,14 +120,14 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window)
windata->window->SetOptions(windata->window, wopts); windata->window->SetOptions(windata->window, wopts);
/* Get the window's surface. */ /* Get the window's surface. */
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
GetSurface(windata->window, &windata->surface)); window->GetSurface(windata->window, &windata->surface));
windata->window->SetOpacity(windata->window, 0xFF); windata->window->SetOpacity(windata->window, 0xFF);
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window,
CreateEventBuffer(windata->window, &(windata->
&(windata->eventbuffer))); eventbuffer)));
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
EnableEvents(windata->window, DWET_ALL)); window->EnableEvents(windata->window, DWET_ALL));
if (window->flags & SDL_WINDOW_FULLSCREEN) if (window->flags & SDL_WINDOW_FULLSCREEN)
windata->window->SetStackingClass(windata->window, DWSC_UPPER); windata->window->SetStackingClass(windata->window, DWSC_UPPER);
...@@ -202,19 +203,21 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window) ...@@ -202,19 +203,21 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window)
int ch; int ch;
/* Make sure all events are disabled for this operation ! */ /* Make sure all events are disabled for this operation ! */
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
DisableEvents(windata->window, DWET_ALL)); window->DisableEvents(windata->window, DWET_ALL));
SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &cw, &ch)); SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &cw, &ch));
if (cw != window->w || ch != window->h) if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
Resize(windata->window, window->w, window->h)); window->Resize(windata->window, window->w,
SDL_DFB_CHECKERR(windata->window-> window->h));
EnableEvents(windata->window, DWET_ALL)); SDL_DFB_CHECKERR(windata->
window->EnableEvents(windata->window, DWET_ALL));
#else #else
SDL_DFB_CHECKERR(windata->window-> SDL_DFB_CHECKERR(windata->
Resize(windata->window, window->w, window->h)); window->Resize(windata->window, window->w,
window->h));
#endif #endif
SDL_DFB_CHECKERR(windata->window->GetSize(windata->window, &window->w, &window->h)); /* if a window manager should have decided otherwise */ 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) ...@@ -777,8 +777,8 @@ iPod_UpdateRects(_THIS, int nrects, SDL_Rect * rects)
~(3 << (2 * (x % 4))); ~(3 << (2 * (x % 4)));
ipod_scr[y * (lcd_width / 4) + x / 4] |= ipod_scr[y * (lcd_width / 4) + x / 4] |=
(((Uint8 *) (SDL_VideoSurface->pixels))[y * (((Uint8 *) (SDL_VideoSurface->pixels))[y *
SDL_VideoSurface-> SDL_VideoSurface->pitch
pitch + +
x] & 3) << (2 x] & 3) << (2
* *
(x (x
......
...@@ -440,8 +440,8 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ...@@ -440,8 +440,8 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
if ((!pVideo->hidden->pSDLSurface) || if ((!pVideo->hidden->pSDLSurface) ||
((pVideo->hidden->pSDLSurface) ((pVideo->hidden->pSDLSurface)
&& &&
((pVideo->hidden-> ((pVideo->hidden->pSDLSurface->
pSDLSurface->flags & SDL_RESIZABLE) == 0))) flags & SDL_RESIZABLE) == 0)))
FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd)); FSLib_ToggleFSMode(hwnd, !FSLib_QueryFSMode(hwnd));
#ifdef DEBUG_BUILD #ifdef DEBUG_BUILD
else else
...@@ -690,15 +690,15 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ...@@ -690,15 +690,15 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
WinQueryWindowPos(hwnd, &swp); WinQueryWindowPos(hwnd, &swp);
if ((!pVideo->hidden->pSDLSurface) || if ((!pVideo->hidden->pSDLSurface) ||
((pVideo->hidden->pSDLSurface) && ((pVideo->hidden->pSDLSurface) &&
(pVideo->hidden-> (pVideo->hidden->pSDLSurface->
pSDLSurface->flags & SDL_RESIZABLE) flags & SDL_RESIZABLE)
&& &&
((swp.cx != ((swp.cx !=
pVideo->hidden-> pVideo->hidden->SrcBufferDesc.
SrcBufferDesc.uiXResolution) uiXResolution)
|| (swp.cy != || (swp.cy !=
pVideo->hidden->SrcBufferDesc. pVideo->hidden->
uiYResolution)) SrcBufferDesc.uiYResolution))
&& (!FSLib_QueryFSMode(hwnd)))) { && (!FSLib_QueryFSMode(hwnd)))) {
// Resizable surface and in resizing! // Resizable surface and in resizing!
// So, don't blit now! // So, don't blit now!
...@@ -717,10 +717,10 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2) ...@@ -717,10 +717,10 @@ WndProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
FSLIB_BITBLT(hwnd, FSLIB_BITBLT(hwnd,
pVideo->hidden->pchSrcBuffer, 0, pVideo->hidden->pchSrcBuffer, 0,
0, 0,
pVideo->hidden->
SrcBufferDesc.uiXResolution,
pVideo->hidden->SrcBufferDesc. pVideo->hidden->SrcBufferDesc.
uiYResolution); uiXResolution,
pVideo->hidden->
SrcBufferDesc.uiYResolution);
} }
} }
#ifdef DEBUG_BUILD #ifdef DEBUG_BUILD
...@@ -2503,26 +2503,21 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current, ...@@ -2503,26 +2503,21 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
pModeInfoFound->uiXResolution, pModeInfoFound->uiXResolution,
pModeInfoFound->uiYResolution, pModeInfoFound->uiYResolution,
pModeInfoFound->uiBPP, ((unsigned int) pModeInfoFound->uiBPP, ((unsigned int)
pModeInfoFound-> pModeInfoFound->PixelFormat.ucRedMask)
PixelFormat. << pModeInfoFound->
ucRedMask) PixelFormat.ucRedPosition,
<< pModeInfoFound->PixelFormat. ((unsigned int)
ucRedPosition, ((unsigned int) pModeInfoFound->PixelFormat.ucGreenMask)
pModeInfoFound-> << pModeInfoFound->
PixelFormat. PixelFormat.ucGreenPosition,
ucGreenMask) ((unsigned int)
<< pModeInfoFound->PixelFormat. pModeInfoFound->PixelFormat.ucBlueMask)
ucGreenPosition, ((unsigned int) << pModeInfoFound->
pModeInfoFound-> PixelFormat.ucBluePosition,
PixelFormat. ((unsigned int)
ucBlueMask) pModeInfoFound->PixelFormat.ucAlphaMask)
<< pModeInfoFound->PixelFormat. << pModeInfoFound->
ucBluePosition, ((unsigned int) PixelFormat.ucAlphaPosition);
pModeInfoFound->
PixelFormat.
ucAlphaMask)
<< pModeInfoFound->PixelFormat.
ucAlphaPosition);
if (pResult == NULL) { if (pResult == NULL) {
DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer); DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer);
...@@ -2536,27 +2531,23 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current, ...@@ -2536,27 +2531,23 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
// Adjust pixel format mask! // Adjust pixel format mask!
pResult->format->Rmask = pResult->format->Rmask =
((unsigned int) pModeInfoFound-> ((unsigned int) pModeInfoFound->PixelFormat.
PixelFormat.ucRedMask) << pModeInfoFound->PixelFormat. ucRedMask) << pModeInfoFound->PixelFormat.ucRedPosition;
ucRedPosition;
pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition; pResult->format->Rshift = pModeInfoFound->PixelFormat.ucRedPosition;
pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust; pResult->format->Rloss = pModeInfoFound->PixelFormat.ucRedAdjust;
pResult->format->Gmask = pResult->format->Gmask =
((unsigned int) pModeInfoFound-> ((unsigned int) pModeInfoFound->PixelFormat.
PixelFormat.ucGreenMask) << pModeInfoFound->PixelFormat. ucGreenMask) << pModeInfoFound->PixelFormat.ucGreenPosition;
ucGreenPosition;
pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition; pResult->format->Gshift = pModeInfoFound->PixelFormat.ucGreenPosition;
pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust; pResult->format->Gloss = pModeInfoFound->PixelFormat.ucGreenAdjust;
pResult->format->Bmask = pResult->format->Bmask =
((unsigned int) pModeInfoFound-> ((unsigned int) pModeInfoFound->PixelFormat.
PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat. ucBlueMask) << pModeInfoFound->PixelFormat.ucBluePosition;
ucBluePosition;
pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition; pResult->format->Bshift = pModeInfoFound->PixelFormat.ucBluePosition;
pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust; pResult->format->Bloss = pModeInfoFound->PixelFormat.ucBlueAdjust;
pResult->format->Amask = pResult->format->Amask =
((unsigned int) pModeInfoFound-> ((unsigned int) pModeInfoFound->PixelFormat.
PixelFormat.ucAlphaMask) << pModeInfoFound->PixelFormat. ucAlphaMask) << pModeInfoFound->PixelFormat.ucAlphaPosition;
ucAlphaPosition;
pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition; pResult->format->Ashift = pModeInfoFound->PixelFormat.ucAlphaPosition;
pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust; pResult->format->Aloss = pModeInfoFound->PixelFormat.ucAlphaAdjust;
...@@ -2815,25 +2806,23 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat) ...@@ -2815,25 +2806,23 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat)
vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8; vformat->BytesPerPixel = (vformat->BitsPerPixel + 7) / 8;
vformat->Rmask = vformat->Rmask =
((unsigned int) pDesktopMode->PixelFormat. ((unsigned int) pDesktopMode->PixelFormat.ucRedMask) << pDesktopMode->
ucRedMask) << pDesktopMode->PixelFormat.ucRedPosition; PixelFormat.ucRedPosition;
vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition; vformat->Rshift = pDesktopMode->PixelFormat.ucRedPosition;
vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust; vformat->Rloss = pDesktopMode->PixelFormat.ucRedAdjust;
vformat->Gmask = vformat->Gmask =
((unsigned int) pDesktopMode-> ((unsigned int) pDesktopMode->PixelFormat.
PixelFormat.ucGreenMask) << pDesktopMode->PixelFormat. ucGreenMask) << pDesktopMode->PixelFormat.ucGreenPosition;
ucGreenPosition;
vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition; vformat->Gshift = pDesktopMode->PixelFormat.ucGreenPosition;
vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust; vformat->Gloss = pDesktopMode->PixelFormat.ucGreenAdjust;
vformat->Bmask = vformat->Bmask =
((unsigned int) pDesktopMode-> ((unsigned int) pDesktopMode->PixelFormat.
PixelFormat.ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition; ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition;
vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition; vformat->Bshift = pDesktopMode->PixelFormat.ucBluePosition;
vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust; vformat->Bloss = pDesktopMode->PixelFormat.ucBlueAdjust;
vformat->Amask = vformat->Amask =
((unsigned int) pDesktopMode-> ((unsigned int) pDesktopMode->PixelFormat.
PixelFormat.ucAlphaMask) << pDesktopMode->PixelFormat. ucAlphaMask) << pDesktopMode->PixelFormat.ucAlphaPosition;
ucAlphaPosition;
vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition; vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition;
vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust; vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust;
...@@ -2938,10 +2927,10 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat) ...@@ -2938,10 +2927,10 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat)
sizeof(_this->hidden->SrcBufferDesc)); sizeof(_this->hidden->SrcBufferDesc));
// Allocate new video buffer! // Allocate new video buffer!
_this->hidden->pchSrcBuffer = _this->hidden->pchSrcBuffer =
(char *) SDL_malloc(_this->hidden-> (char *) SDL_malloc(_this->hidden->pAvailableFSLibVideoModes->
pAvailableFSLibVideoModes->uiScanLineSize * uiScanLineSize *
_this->hidden-> _this->hidden->pAvailableFSLibVideoModes->
pAvailableFSLibVideoModes->uiYResolution); uiYResolution);
if (!_this->hidden->pchSrcBuffer) { if (!_this->hidden->pchSrcBuffer) {
#ifdef DEBUG_BUILD #ifdef DEBUG_BUILD
printf printf
......
...@@ -314,17 +314,14 @@ ph_SetupOpenGLContext(_THIS, int width, int height, int bpp, Uint32 flags) ...@@ -314,17 +314,14 @@ ph_SetupOpenGLContext(_THIS, int width, int height, int bpp, Uint32 flags)
&& (this->gl_config.accum_blue_size != 0) && (this->gl_config.accum_blue_size != 0)
&& (this->gl_config.accum_green_size != 0)) { && (this->gl_config.accum_green_size != 0)) {
qnxgl_attribs_slide = qnxgl_attrib_set_accum(qnxgl_attribs_slide, qnxgl_attribs_slide = qnxgl_attrib_set_accum(qnxgl_attribs_slide,
this-> this->gl_config.
gl_config.accum_red_size accum_red_size +
+ this->gl_config.
this-> accum_blue_size +
gl_config.accum_blue_size this->gl_config.accum_green_size
+ +
this-> this->
gl_config. gl_config.accum_alpha_size);
accum_green_size +
this->gl_config.
accum_alpha_size);
} }
/* Stereo mode */ /* Stereo mode */
......
...@@ -149,8 +149,8 @@ ph_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, ...@@ -149,8 +149,8 @@ ph_CreateYUVOverlay(_THIS, int width, int height, Uint32 format,
&overlay->hwdata->caps); &overlay->hwdata->caps);
if (rtncode == 0) { if (rtncode == 0) {
if (overlay->hwdata->caps.format == format) { if (overlay->hwdata->caps.format == format) {
if ((overlay->hwdata-> if ((overlay->hwdata->caps.
caps.flags & Pg_SCALER_CAP_DST_CHROMA_KEY) == flags & Pg_SCALER_CAP_DST_CHROMA_KEY) ==
Pg_SCALER_CAP_DST_CHROMA_KEY) { Pg_SCALER_CAP_DST_CHROMA_KEY) {
overlay->hwdata->ischromakey = 1; overlay->hwdata->ischromakey = 1;
} }
......
...@@ -693,8 +693,8 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture, ...@@ -693,8 +693,8 @@ D3D_UpdateTexture(SDL_Renderer * renderer, SDL_Texture * texture,
result = result =
IDirect3DDevice9_CreateTexture(renderdata->device, texture->w, IDirect3DDevice9_CreateTexture(renderdata->device, texture->w,
texture->h, 1, 0, texture->h, 1, 0,
PixelFormatToD3DFMT(texture-> PixelFormatToD3DFMT
format), (texture->format),
D3DPOOL_SYSTEMMEM, &temp, NULL); D3DPOOL_SYSTEMMEM, &temp, NULL);
if (FAILED(result)) { if (FAILED(result)) {
D3D_SetError("CreateTexture()", result); D3D_SetError("CreateTexture()", result);
......
...@@ -114,10 +114,8 @@ WIN_CreateDevice(int devindex) ...@@ -114,10 +114,8 @@ WIN_CreateDevice(int devindex)
(UINT(*)(UINT, UINT, LPVOID)) GetProcAddress(data->wintabDLL, (UINT(*)(UINT, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
PROCNAME(WTInfoA)); PROCNAME(WTInfoA));
data->WTOpenA = data->WTOpenA =
(HCTX(*)(HWND, LPLOGCONTEXTA, BOOL)) GetProcAddress(data-> (HCTX(*)(HWND, LPLOGCONTEXTA, BOOL))
wintabDLL, GetProcAddress(data->wintabDLL, PROCNAME(WTOpenA));
PROCNAME
(WTOpenA));
data->WTPacket = data->WTPacket =
(int (*)(HCTX, UINT, LPVOID)) GetProcAddress(data->wintabDLL, (int (*)(HCTX, UINT, LPVOID)) GetProcAddress(data->wintabDLL,
PROCNAME(WTPacket)); PROCNAME(WTPacket));
......
...@@ -311,7 +311,6 @@ X11_DispatchEvent(_THIS) ...@@ -311,7 +311,6 @@ X11_DispatchEvent(_THIS)
} }
continue; continue;
} }
#if SDL_VIDEO_DRIVER_X11_XINPUT #if SDL_VIDEO_DRIVER_X11_XINPUT
data = (X11_MouseData *) mouse->driverdata; data = (X11_MouseData *) mouse->driverdata;
if (xevent.type == data->motion) { if (xevent.type == data->motion) {
......
...@@ -417,8 +417,8 @@ X11_GL_CreateContext(_THIS, SDL_Window * window) ...@@ -417,8 +417,8 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
SDL_WindowData *data = (SDL_WindowData *) window->driverdata; SDL_WindowData *data = (SDL_WindowData *) window->driverdata;
Display *display = data->videodata->display; Display *display = data->videodata->display;
int screen = int screen =
((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)-> ((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->driverdata)->
driverdata)->screen; screen;
XWindowAttributes xattr; XWindowAttributes xattr;
XVisualInfo v, *vinfo; XVisualInfo v, *vinfo;
int n; int n;
......
...@@ -271,10 +271,7 @@ X11_VideoQuit(_THIS) ...@@ -271,10 +271,7 @@ X11_VideoQuit(_THIS)
SDL_bool SDL_bool
X11_UseDirectColorVisuals() X11_UseDirectColorVisuals()
{ {
/* Once we implement DirectColor colormaps and gamma ramp support... return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE;
return SDL_getenv("SDL_VIDEO_X11_NODIRECTCOLOR") ? SDL_FALSE : SDL_TRUE;
*/
return SDL_FALSE;
} }
/* vim: set ts=4 sw=4 expandtab: */ /* 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