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) ...@@ -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. "1"(v.s.
s.b)); 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-> SDL_LookupString(error->args[argi++].
args[argi++].buf)); 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->hidden-> DosPostEventSem(pSDLAudioDevice->
hevAudioBufferPlayed); hidden->hevAudioBufferPlayed);
} }
} }
} }
...@@ -312,10 +312,11 @@ DART_PlayDevice(_THIS) ...@@ -312,10 +312,11 @@ 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->MixSetupParms. _this->hidden->MixSetupParms.pmixWrite(_this->hidden->
ulMixHandle, MixSetupParms.ulMixHandle,
&(_this->hidden-> &(_this->
pMixBuffers[iFreeBuf]), 1); hidden->pMixBuffers[iFreeBuf]),
1);
_this->hidden->iLastPlayedBuf = iFreeBuf; _this->hidden->iLastPlayedBuf = iFreeBuf;
iFreeBuf = (iFreeBuf + 1) % _this->hidden->iCurrNumBufs; iFreeBuf = (iFreeBuf + 1) % _this->hidden->iCurrNumBufs;
...@@ -333,8 +334,8 @@ DART_GetDeviceBuf(_THIS) ...@@ -333,8 +334,8 @@ DART_GetDeviceBuf(_THIS)
if (_this->hidden) { if (_this->hidden) {
iFreeBuf = _this->hidden->iNextFreeBuffer; iFreeBuf = _this->hidden->iNextFreeBuffer;
pBufDesc = pBufDesc =
(pMixBufferDesc) _this->hidden->pMixBuffers[iFreeBuf]. (pMixBufferDesc) _this->hidden->
ulUserParm; pMixBuffers[iFreeBuf].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->wavebuf[this->hidden->next_buffer]. return (Uint8 *) (this->hidden->
lpData); wavebuf[this->hidden->next_buffer].lpData);
} }
void void
......
...@@ -278,8 +278,9 @@ DSOUND_GetDeviceBuf(_THIS) ...@@ -278,8 +278,9 @@ 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->hidden-> (LPVOID *) & this->
locked_buf, &rawlen, NULL, &junk, 0); hidden->locked_buf, &rawlen, NULL,
&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 &SDL_hapticlist[numhaptics].
[numhaptics].usagePage)) 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 &SDL_hapticlist[numhaptics].
[numhaptics].usage)) usage))
SDL_SetError("Haptic: Recieving device's usage."); SDL_SetError("Haptic: Recieving device's usage.");
} }
} }
......
...@@ -96,7 +96,6 @@ NDS_EZF_ChipReset() ...@@ -96,7 +96,6 @@ 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_hapticlist[SDL_numhaptics].
[SDL_numhaptics].capabilities); 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-> (LPVOID *) & haptic->hwdata->
hwdata->device); 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-> SDL_hapticlist[haptic->index].
index].instance); 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->axis[1]][the_hat-> position_map[the_hat->
axis[0]]); axis[1]][the_hat->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->hwdata-> joystick->
key_map[code], hwdata->key_map[code],
events[i].value)) events[i].value))
#endif #endif
SDL_PrivateJoystickButton(joystick, SDL_PrivateJoystickButton(joystick,
joystick->hwdata-> joystick->
key_map[code], hwdata->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->hwdata-> joystick->
abs_map[code], hwdata->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)-> *) (((struct dylib_command *) lc)->dylib.
dylib.name.offset + (char *) lc)))) { 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->Gshift) | (0xff << df-> (0xff << df->Rshift) | (0xff << df->
Bshift); Gshift) | (0xff << df->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->Ashift) : 0x10) << (dstfmt-> ((srcfmt->Amask) ? RESHIFT(srcfmt->
Ashift); Ashift) : 0x10) << (dstfmt->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->Ashift) : 0x10) << (dstfmt-> ((srcfmt->Amask) ? RESHIFT(srcfmt->
Ashift); Ashift) : 0x10) << (dstfmt->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-> ((GL_TextureData *) texture->driverdata)->
driverdata)->HACK_RYAN_FIXME); HACK_RYAN_FIXME);
} }
static int static int
......
...@@ -479,8 +479,8 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode) ...@@ -479,8 +479,8 @@ SDL_GetSurfaceBlendMode(SDL_Surface * surface, int *blendMode)
return 0; return 0;
} }
switch (surface->map->info. switch (surface->map->
flags & (SDL_COPY_MASK | SDL_COPY_BLEND | SDL_COPY_ADD | info.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;
......
...@@ -349,8 +349,8 @@ SDL_AtariGL_MakeCurrent(_THIS) ...@@ -349,8 +349,8 @@ SDL_AtariGL_MakeCurrent(_THIS)
} }
if (! if (!
(_this->gl_data-> (_this->
OSMesaMakeCurrent(gl_ctx, surface->pixels, type, surface->w, gl_data->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->gl_config. _this->
depth_size, gl_config.depth_size,
_this->gl_config. _this->
stencil_size, newaccumsize, gl_config.stencil_size,
NULL); newaccumsize, 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->gl_config. SDL_arraysize(_this->
driver_path)); gl_config.driver_path));
} }
} }
} }
......
...@@ -60,9 +60,8 @@ DirectFB_SetContext(_THIS, SDL_WindowID id) ...@@ -60,9 +60,8 @@ DirectFB_SetContext(_THIS, SDL_WindowID id)
int ret; int ret;
if (dispdata->vidIDinuse) if (dispdata->vidIDinuse)
SDL_DFB_CHECKERR(dispdata-> SDL_DFB_CHECKERR(dispdata->vidlayer->
vidlayer->SwitchContext(dispdata->vidlayer, SwitchContext(dispdata->vidlayer, DFB_TRUE));
DFB_TRUE));
error: error:
return; return;
...@@ -149,8 +148,8 @@ DirectFB_PumpEventsWindow(_THIS) ...@@ -149,8 +148,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 DirectFB_TranslateButton(evt.
(evt.button)); button));
} else { } else {
MotionAllMice(_this, evt.x, evt.y); MotionAllMice(_this, evt.x, evt.y);
} }
...@@ -161,8 +160,8 @@ DirectFB_PumpEventsWindow(_THIS) ...@@ -161,8 +160,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 DirectFB_TranslateButton(evt.
(evt.button)); button));
} else { } else {
MotionAllMice(_this, evt.x, evt.y); MotionAllMice(_this, evt.x, evt.y);
} }
...@@ -522,7 +521,6 @@ DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt, ...@@ -522,7 +521,6 @@ DirectFB_TranslateKeyInputEvent(_THIS, int index, DFBInputEvent * evt,
return keysym; return keysym;
} }
static int static int
DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button) DirectFB_TranslateButton(DFBInputDeviceButtonIdentifier button)
{ {
...@@ -604,18 +602,17 @@ DirectFB_InitKeyboard(_THIS) ...@@ -604,18 +602,17 @@ 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-> SDL_DFB_CHECK(devdata->dfb->
dfb->EnumInputDevices(devdata->dfb, EnumKeyboards, EnumInputDevices(devdata->dfb, EnumKeyboards, devdata));
devdata));
if (devdata->num_keyboard == 0) { if (devdata->num_keyboard == 0) {
sys_ids = 1; sys_ids = 1;
SDL_DFB_CHECK(devdata-> SDL_DFB_CHECK(devdata->dfb->
dfb->EnumInputDevices(devdata->dfb, EnumKeyboards, EnumInputDevices(devdata->dfb, EnumKeyboards,
devdata)); devdata));
} }
} else { } else {
SDL_DFB_CHECK(devdata-> SDL_DFB_CHECK(devdata->dfb->
dfb->EnumInputDevices(devdata->dfb, input_device_cb, EnumInputDevices(devdata->dfb, input_device_cb,
devdata)); devdata));
} }
} }
...@@ -653,25 +650,33 @@ DirectFB_PumpEvents(_THIS) ...@@ -653,25 +650,33 @@ 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 DirectFB_TranslateButton(evt.
(evt.button), 0, 0); button),
0, 0);
break; break;
case DIET_BUTTONRELEASE: case DIET_BUTTONRELEASE:
posted += SDL_PrivateMouseButton(SDL_RELEASED, posted += SDL_PrivateMouseButton(SDL_RELEASED,
DirectFB_TranslateButton DirectFB_TranslateButton(evt.
(evt.button), 0, 0); button),
0, 0);
break; break;
case DIET_KEYPRESS: case DIET_KEYPRESS:
posted += SDL_PrivateKeyboard(SDL_PRESSED, posted += SDL_PrivateKeyboard(SDL_PRESSED,
DirectFB_TranslateKey DirectFB_TranslateKey(evt.
(evt.key_id, evt.key_symbol, key_id,
mod, &keysym)); evt.
key_symbol,
mod,
&keysym));
break; break;
case DIET_KEYRELEASE: case DIET_KEYRELEASE:
posted += SDL_PrivateKeyboard(SDL_RELEASED, posted += SDL_PrivateKeyboard(SDL_RELEASED,
DirectFB_TranslateKey DirectFB_TranslateKey(evt.
(evt.key_id, evt.key_symbol, key_id,
mod, &keysym)); evt.
key_symbol,
mod,
&keysym));
break; break;
case DIET_AXISMOTION: case DIET_AXISMOTION:
if (evt.flags & DIEF_AXISREL) { if (evt.flags & DIEF_AXISREL) {
......
...@@ -204,9 +204,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode) ...@@ -204,9 +204,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags failed; DFBDisplayLayerConfigFlags failed;
int ret; int ret;
SDL_DFB_CHECKERR(data-> SDL_DFB_CHECKERR(data->layer->
layer->SetCooperativeLevel(data->layer, SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE));
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);
...@@ -217,8 +216,8 @@ CheckSetDisplayMode(_THIS, DFB_DisplayData * data, SDL_DisplayMode * mode) ...@@ -217,8 +216,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-> SDL_DFB_CHECKERR(data->layer->
layer->SetCooperativeLevel(data->layer, DLSCL_SHARED)); 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
...@@ -260,20 +259,19 @@ DirectFB_InitModes(_THIS) ...@@ -260,20 +259,19 @@ DirectFB_InitModes(_THIS)
screencbdata->vidlayer[i] = -1; screencbdata->vidlayer[i] = -1;
} }
SDL_DFB_CHECKERR(devdata-> SDL_DFB_CHECKERR(devdata->dfb->
dfb->EnumScreens(devdata->dfb, &cbScreens, EnumScreens(devdata->dfb, &cbScreens, screencbdata));
screencbdata));
for (i = 0; i < screencbdata->numscreens; i++) { for (i = 0; i < screencbdata->numscreens; i++) {
IDirectFBScreen *screen; IDirectFBScreen *screen;
SDL_DFB_CHECKERR(devdata-> SDL_DFB_CHECKERR(devdata->dfb->
dfb->GetScreen(devdata->dfb, GetScreen(devdata->dfb, screencbdata->screenid[i],
screencbdata->screenid[i], &screen)); &screen));
screencbdata->aux = i; screencbdata->aux = i;
SDL_DFB_CHECKERR(screen->EnumDisplayLayers SDL_DFB_CHECKERR(screen->
(screen, &cbLayers, screencbdata)); EnumDisplayLayers(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
...@@ -295,12 +293,12 @@ DirectFB_InitModes(_THIS) ...@@ -295,12 +293,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->GetDisplayLayer(devdata->dfb, SDL_DFB_CHECKERR(devdata->dfb->
screencbdata-> GetDisplayLayer(devdata->dfb,
gralayer[i], &layer)); screencbdata->gralayer[i], &layer));
SDL_DFB_CHECKERR(layer->SetCooperativeLevel SDL_DFB_CHECKERR(layer->
(layer, DLSCL_ADMINISTRATIVE)); SetCooperativeLevel(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));
...@@ -383,9 +381,8 @@ DirectFB_GetDisplayModes(_THIS) ...@@ -383,9 +381,8 @@ 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-> SDL_DFB_CHECKERR(devdata->dfb->
dfb->EnumVideoModes(devdata->dfb, EnumModesCallback, EnumVideoModes(devdata->dfb, EnumModesCallback, &data));
&data));
for (i = 0; i < data.nummodes; ++i) { for (i = 0; i < data.nummodes; ++i) {
mode = data.modelist[i]; mode = data.modelist[i];
...@@ -422,9 +419,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -422,9 +419,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
DFBDisplayLayerConfigFlags fail = 0; DFBDisplayLayerConfigFlags fail = 0;
DFBResult ret; DFBResult ret;
SDL_DFB_CHECKERR(data-> SDL_DFB_CHECKERR(data->layer->
layer->SetCooperativeLevel(data->layer, SetCooperativeLevel(data->layer, DLSCL_ADMINISTRATIVE));
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;
...@@ -462,8 +458,8 @@ DirectFB_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -462,8 +458,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-> SDL_DFB_CHECKERR(data->layer->
layer->SetCooperativeLevel(data->layer, DLSCL_SHARED)); SetCooperativeLevel(data->layer, DLSCL_SHARED));
if ((config.width != rconfig.width) || if ((config.width != rconfig.width) ||
(config.height != rconfig.height) || (config.height != rconfig.height) ||
...@@ -506,14 +502,13 @@ DirectFB_QuitModes(_THIS) ...@@ -506,14 +502,13 @@ 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-> SDL_DFB_CHECK(dispdata->layer->
layer->SetCooperativeLevel(dispdata->layer, SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECK(dispdata-> SDL_DFB_CHECK(dispdata->layer->
layer->SetCursorOpacity(dispdata->layer, 0x00)); SetCursorOpacity(dispdata->layer, 0x00));
SDL_DFB_CHECK(dispdata-> SDL_DFB_CHECK(dispdata->layer->
layer->SetCooperativeLevel(dispdata->layer, SetCooperativeLevel(dispdata->layer, DLSCL_SHARED));
DLSCL_SHARED));
} }
SDL_DFB_RELEASE(dispdata->layer); SDL_DFB_RELEASE(dispdata->layer);
......
...@@ -132,15 +132,14 @@ DirectFB_CreateCursor(SDL_Surface * surface, int hot_x, int hot_y) ...@@ -132,15 +132,14 @@ 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-> SDL_DFB_CHECKERR(devdata->dfb->
dfb->CreateSurface(devdata->dfb, &dsc, &curdata->surf)); 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-> SDL_DFB_CHECKERR(curdata->surf->
surf->Lock(curdata->surf, DSLF_WRITE, (void *) &dest, Lock(curdata->surf, DSLF_WRITE, (void *) &dest, &pitch));
&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;
...@@ -175,21 +174,20 @@ DirectFB_ShowCursor(SDL_Cursor * cursor) ...@@ -175,21 +174,20 @@ 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-> SDL_DFB_CHECKERR(windata->window->
window->SetCursorShape(windata->window, SetCursorShape(windata->window,
curdata->surf, curdata->surf, curdata->hotx,
curdata->hotx,
curdata->hoty)); curdata->hoty));
/* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */ /* fprintf(stdout, "Cursor is %s\n", cursor ? "on" : "off"); */
SDL_DFB_CHECKERR(dispdata-> SDL_DFB_CHECKERR(dispdata->layer->
layer->SetCooperativeLevel(dispdata->layer, SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
SDL_DFB_CHECKERR(dispdata-> SDL_DFB_CHECKERR(dispdata->layer->
layer->SetCursorOpacity(dispdata->layer, SetCursorOpacity(dispdata->layer,
cursor ? 0xC0 : 0x00)); cursor ? 0xC0 : 0x00));
SDL_DFB_CHECKERR(dispdata-> SDL_DFB_CHECKERR(dispdata->layer->
layer->SetCooperativeLevel(dispdata->layer, SetCooperativeLevel(dispdata->layer,
DLSCL_SHARED)); DLSCL_SHARED));
} }
} }
...@@ -229,8 +227,8 @@ DirectFB_WarpMouse(SDL_Mouse * mouse, SDL_WindowID windowID, int x, int y) ...@@ -229,8 +227,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-> SDL_DFB_CHECKERR(dispdata->layer->
layer->WarpCursor(dispdata->layer, cx + x, cy + y)); 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-> SDL_DFB_CHECKERR(windata->surface->
surface->GetGL(windata->surface, &context->context)); GetGL(windata->surface, &context->context));
if (!context->context) if (!context->context)
return NULL; return NULL;
...@@ -212,11 +212,11 @@ DirectFB_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) ...@@ -212,11 +212,11 @@ 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-> SDL_DFB_CHECKERR(windata->surface->
surface->GetSize(windata->surface, &cw, &ch)); GetSize(windata->surface, &cw, &ch));
if (cw != window->w || ch != window->h) if (cw != window->w || ch != window->h)
SDL_DFB_CHECKERR(windata-> SDL_DFB_CHECKERR(windata->window->
window->ResizeSurface(windata->window, window->w, ResizeSurface(windata->window, window->w,
window->h)); window->h));
} }
...@@ -266,9 +266,8 @@ DirectFB_GL_SwapWindow(_THIS, SDL_Window * window) ...@@ -266,9 +266,8 @@ 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-> SDL_DFB_CHECKERR(windata->surface->
surface->Flip(windata->surface, &region, Flip(windata->surface, &region, DSFLIP_ONSYNC));
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,15 +190,14 @@ DirectFB_VideoInit(_THIS) ...@@ -190,15 +190,14 @@ 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->CreateInputEventBuffer(dfb, DICAPS_ALL, SDL_DFB_CHECKERR(dfb->
DFB_TRUE, CreateInputEventBuffer(dfb, DICAPS_ALL,
&devdata->events)); DFB_TRUE, &devdata->events));
} else { } else {
SDL_DFB_CHECKERR(dfb->CreateInputEventBuffer(dfb, SDL_DFB_CHECKERR(dfb->
DICAPS_AXES CreateInputEventBuffer(dfb,
/*DICAPS_ALL */ , DICAPS_AXES /*DICAPS_ALL */ ,
DFB_TRUE, DFB_TRUE, &devdata->events));
&devdata->events));
} }
devdata->initialized = 1; devdata->initialized = 1;
......
...@@ -43,10 +43,10 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -43,10 +43,10 @@ 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-> SDL_DFB_CHECKERR(devdata->dfb->
dfb->SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL)); SetCooperativeLevel(devdata->dfb, DFSCL_NORMAL));
SDL_DFB_CHECKERR(dispdata-> SDL_DFB_CHECKERR(dispdata->layer->
layer->SetCooperativeLevel(dispdata->layer, SetCooperativeLevel(dispdata->layer,
DLSCL_ADMINISTRATIVE)); DLSCL_ADMINISTRATIVE));
/* Fill the window description. */ /* Fill the window description. */
...@@ -100,9 +100,8 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -100,9 +100,8 @@ 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-> SDL_DFB_CHECKERR(dispdata->layer->
layer->CreateWindow(dispdata->layer, &desc, CreateWindow(dispdata->layer, &desc, &windata->window));
&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)
...@@ -120,14 +119,14 @@ DirectFB_CreateWindow(_THIS, SDL_Window * window) ...@@ -120,14 +119,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-> SDL_DFB_CHECKERR(windata->window->
window->GetSurface(windata->window, &windata->surface)); GetSurface(windata->window, &windata->surface));
windata->window->SetOpacity(windata->window, 0xFF); windata->window->SetOpacity(windata->window, 0xFF);
SDL_DFB_CHECKERR(windata->window->CreateEventBuffer(windata->window, SDL_DFB_CHECKERR(windata->window->
&(windata-> CreateEventBuffer(windata->window,
eventbuffer))); &(windata->eventbuffer)));
SDL_DFB_CHECKERR(windata-> SDL_DFB_CHECKERR(windata->window->
window->EnableEvents(windata->window, DWET_ALL)); 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);
...@@ -203,21 +202,19 @@ DirectFB_SetWindowSize(_THIS, SDL_Window * window) ...@@ -203,21 +202,19 @@ 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-> SDL_DFB_CHECKERR(windata->window->
window->DisableEvents(windata->window, DWET_ALL)); 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-> SDL_DFB_CHECKERR(windata->window->
window->Resize(windata->window, window->w, Resize(windata->window, window->w, window->h));
window->h)); SDL_DFB_CHECKERR(windata->window->
SDL_DFB_CHECKERR(windata-> EnableEvents(windata->window, DWET_ALL));
window->EnableEvents(windata->window, DWET_ALL));
#else #else
SDL_DFB_CHECKERR(windata-> SDL_DFB_CHECKERR(windata->window->
window->Resize(windata->window, window->w, Resize(windata->window, window->w, window->h));
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->pitch SDL_VideoSurface->
+ 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->pSDLSurface-> ((pVideo->hidden->
flags & SDL_RESIZABLE) == 0))) pSDLSurface->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->pSDLSurface-> (pVideo->hidden->
flags & SDL_RESIZABLE) pSDLSurface->flags & SDL_RESIZABLE)
&& &&
((swp.cx != ((swp.cx !=
pVideo->hidden->SrcBufferDesc.
uiXResolution)
|| (swp.cy !=
pVideo->hidden-> pVideo->hidden->
SrcBufferDesc.uiYResolution)) SrcBufferDesc.uiXResolution)
|| (swp.cy !=
pVideo->hidden->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-> pVideo->hidden->
SrcBufferDesc.uiYResolution); SrcBufferDesc.uiXResolution,
pVideo->hidden->SrcBufferDesc.
uiYResolution);
} }
} }
#ifdef DEBUG_BUILD #ifdef DEBUG_BUILD
...@@ -2503,21 +2503,26 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current, ...@@ -2503,21 +2503,26 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
pModeInfoFound->uiXResolution, pModeInfoFound->uiXResolution,
pModeInfoFound->uiYResolution, pModeInfoFound->uiYResolution,
pModeInfoFound->uiBPP, ((unsigned int) pModeInfoFound->uiBPP, ((unsigned int)
pModeInfoFound->PixelFormat.ucRedMask) pModeInfoFound->
<< pModeInfoFound-> PixelFormat.
PixelFormat.ucRedPosition, ucRedMask)
((unsigned int) << pModeInfoFound->PixelFormat.
pModeInfoFound->PixelFormat.ucGreenMask) ucRedPosition, ((unsigned int)
<< pModeInfoFound-> pModeInfoFound->
PixelFormat.ucGreenPosition, PixelFormat.
((unsigned int) ucGreenMask)
pModeInfoFound->PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat.
<< pModeInfoFound-> ucGreenPosition, ((unsigned int)
PixelFormat.ucBluePosition, pModeInfoFound->
((unsigned int) PixelFormat.
pModeInfoFound->PixelFormat.ucAlphaMask) ucBlueMask)
<< pModeInfoFound-> << pModeInfoFound->PixelFormat.
PixelFormat.ucAlphaPosition); ucBluePosition, ((unsigned int)
pModeInfoFound->
PixelFormat.
ucAlphaMask)
<< pModeInfoFound->PixelFormat.
ucAlphaPosition);
if (pResult == NULL) { if (pResult == NULL) {
DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer); DosReleaseMutexSem(_this->hidden->hmtxUseSrcBuffer);
...@@ -2531,23 +2536,27 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current, ...@@ -2531,23 +2536,27 @@ os2fslib_SetVideoMode(_THIS, SDL_Surface * current,
// Adjust pixel format mask! // Adjust pixel format mask!
pResult->format->Rmask = pResult->format->Rmask =
((unsigned int) pModeInfoFound->PixelFormat. ((unsigned int) pModeInfoFound->
ucRedMask) << pModeInfoFound->PixelFormat.ucRedPosition; PixelFormat.ucRedMask) << pModeInfoFound->PixelFormat.
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->PixelFormat. ((unsigned int) pModeInfoFound->
ucGreenMask) << pModeInfoFound->PixelFormat.ucGreenPosition; PixelFormat.ucGreenMask) << pModeInfoFound->PixelFormat.
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->PixelFormat. ((unsigned int) pModeInfoFound->
ucBlueMask) << pModeInfoFound->PixelFormat.ucBluePosition; PixelFormat.ucBlueMask) << pModeInfoFound->PixelFormat.
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->PixelFormat. ((unsigned int) pModeInfoFound->
ucAlphaMask) << pModeInfoFound->PixelFormat.ucAlphaPosition; PixelFormat.ucAlphaMask) << pModeInfoFound->PixelFormat.
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;
...@@ -2806,23 +2815,25 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat) ...@@ -2806,23 +2815,25 @@ 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.ucRedMask) << pDesktopMode-> ((unsigned int) pDesktopMode->PixelFormat.
PixelFormat.ucRedPosition; ucRedMask) << pDesktopMode->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->PixelFormat. ((unsigned int) pDesktopMode->
ucGreenMask) << pDesktopMode->PixelFormat.ucGreenPosition; PixelFormat.ucGreenMask) << pDesktopMode->PixelFormat.
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->PixelFormat. ((unsigned int) pDesktopMode->
ucBlueMask) << pDesktopMode->PixelFormat.ucBluePosition; PixelFormat.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->PixelFormat. ((unsigned int) pDesktopMode->
ucAlphaMask) << pDesktopMode->PixelFormat.ucAlphaPosition; PixelFormat.ucAlphaMask) << pDesktopMode->PixelFormat.
ucAlphaPosition;
vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition; vformat->Ashift = pDesktopMode->PixelFormat.ucAlphaPosition;
vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust; vformat->Aloss = pDesktopMode->PixelFormat.ucAlphaAdjust;
...@@ -2927,10 +2938,10 @@ os2fslib_VideoInit(_THIS, SDL_PixelFormat * vformat) ...@@ -2927,10 +2938,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->pAvailableFSLibVideoModes-> (char *) SDL_malloc(_this->hidden->
uiScanLineSize * pAvailableFSLibVideoModes->uiScanLineSize *
_this->hidden->pAvailableFSLibVideoModes-> _this->hidden->
uiYResolution); pAvailableFSLibVideoModes->uiYResolution);
if (!_this->hidden->pchSrcBuffer) { if (!_this->hidden->pchSrcBuffer) {
#ifdef DEBUG_BUILD #ifdef DEBUG_BUILD
printf printf
......
...@@ -314,14 +314,17 @@ ph_SetupOpenGLContext(_THIS, int width, int height, int bpp, Uint32 flags) ...@@ -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_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->gl_config. this->
accum_red_size + gl_config.accum_red_size
this->gl_config.
accum_blue_size +
this->gl_config.accum_green_size
+ +
this-> 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 */ /* 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->caps. if ((overlay->hwdata->
flags & Pg_SCALER_CAP_DST_CHROMA_KEY) == caps.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 PixelFormatToD3DFMT(texture->
(texture->format), format),
D3DPOOL_SYSTEMMEM, &temp, NULL); D3DPOOL_SYSTEMMEM, &temp, NULL);
if (FAILED(result)) { if (FAILED(result)) {
D3D_SetError("CreateTexture()", result); D3D_SetError("CreateTexture()", result);
......
...@@ -114,8 +114,10 @@ WIN_CreateDevice(int devindex) ...@@ -114,8 +114,10 @@ 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)) (HCTX(*)(HWND, LPLOGCONTEXTA, BOOL)) GetProcAddress(data->
GetProcAddress(data->wintabDLL, PROCNAME(WTOpenA)); wintabDLL,
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,6 +311,7 @@ X11_DispatchEvent(_THIS) ...@@ -311,6 +311,7 @@ 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)->driverdata)-> ((SDL_DisplayData *) SDL_GetDisplayFromWindow(window)->
screen; driverdata)->screen;
XWindowAttributes xattr; XWindowAttributes xattr;
XVisualInfo v, *vinfo; XVisualInfo v, *vinfo;
int n; int n;
......
...@@ -271,7 +271,10 @@ X11_VideoQuit(_THIS) ...@@ -271,7 +271,10 @@ 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