winex11.drv: Remove unneeded casts.
This commit is contained in:
parent
f44d2eddcb
commit
68feed7e77
|
@ -681,8 +681,8 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
register INT x, y;
|
||||
BOOL hstretch, vstretch, hswap, vswap;
|
||||
|
||||
hswap = ((int)widthSrc * widthDst) < 0;
|
||||
vswap = ((int)heightSrc * heightDst) < 0;
|
||||
hswap = widthSrc * widthDst < 0;
|
||||
vswap = heightSrc * heightDst < 0;
|
||||
widthSrc = abs(widthSrc);
|
||||
heightSrc = abs(heightSrc);
|
||||
widthDst = abs(widthDst);
|
||||
|
@ -708,7 +708,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
|
||||
if (hstretch)
|
||||
{
|
||||
xinc = ((int)widthSrc << 16) / widthDst;
|
||||
xinc = (widthSrc << 16) / widthDst;
|
||||
xoff = ((widthSrc << 16) - (xinc * widthDst)) / 2;
|
||||
}
|
||||
else
|
||||
|
@ -720,7 +720,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
wine_tsx11_lock();
|
||||
if (vstretch)
|
||||
{
|
||||
yinc = ((int)heightSrc << 16) / heightDst;
|
||||
yinc = (heightSrc << 16) / heightDst;
|
||||
ydst = visRectDst->top;
|
||||
if (vswap)
|
||||
{
|
||||
|
@ -778,7 +778,7 @@ static void BITBLT_StretchImage( XImage *srcImage, XImage *dstImage,
|
|||
}
|
||||
else /* Shrinking */
|
||||
{
|
||||
yinc = ((int)heightDst << 16) / heightSrc;
|
||||
yinc = (heightDst << 16) / heightSrc;
|
||||
ysrc = visRectSrc->top;
|
||||
ydst = ((heightDst << 16) - (yinc * heightSrc)) / 2;
|
||||
if (vswap)
|
||||
|
|
|
@ -1648,7 +1648,7 @@ HANDLE X11DRV_CLIPBOARD_ExportXAPIXMAP(Window requestor, Atom aTarget, Atom rpro
|
|||
memcpy(lpData, &lpdata->drvData, *lpBytes);
|
||||
GlobalUnlock(hData);
|
||||
|
||||
return (HANDLE) hData;
|
||||
return hData;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1666,8 +1666,7 @@ HANDLE X11DRV_CLIPBOARD_ExportMetaFilePict(Window requestor, Atom aTarget, Atom
|
|||
return 0;
|
||||
}
|
||||
|
||||
return X11DRV_CLIPBOARD_SerializeMetafile(CF_METAFILEPICT, (HANDLE)lpdata->hData32,
|
||||
lpBytes, TRUE);
|
||||
return X11DRV_CLIPBOARD_SerializeMetafile(CF_METAFILEPICT, lpdata->hData32, lpBytes, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1685,8 +1684,7 @@ HANDLE X11DRV_CLIPBOARD_ExportEnhMetaFile(Window requestor, Atom aTarget, Atom r
|
|||
return 0;
|
||||
}
|
||||
|
||||
return X11DRV_CLIPBOARD_SerializeMetafile(CF_ENHMETAFILE, (HANDLE)lpdata->hData32,
|
||||
lpBytes, TRUE);
|
||||
return X11DRV_CLIPBOARD_SerializeMetafile(CF_ENHMETAFILE, lpdata->hData32, lpBytes, TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -2136,7 +2134,7 @@ static HANDLE X11DRV_CLIPBOARD_SerializeMetafile(INT wformat, HANDLE hdata, LPDW
|
|||
unsigned int wiresize, size;
|
||||
LPMETAFILEPICT lpmfp = (LPMETAFILEPICT) GlobalLock(h);
|
||||
|
||||
memcpy(lpmfp, (LPVOID)hdata, sizeof(METAFILEPICT));
|
||||
memcpy(lpmfp, hdata, sizeof(METAFILEPICT));
|
||||
wiresize = *lpcbytes - sizeof(METAFILEPICT);
|
||||
lpmfp->hMF = SetMetaFileBitsEx(wiresize,
|
||||
((const BYTE *)hdata) + sizeof(METAFILEPICT));
|
||||
|
@ -2146,7 +2144,7 @@ static HANDLE X11DRV_CLIPBOARD_SerializeMetafile(INT wformat, HANDLE hdata, LPDW
|
|||
}
|
||||
else if (wformat == CF_ENHMETAFILE)
|
||||
{
|
||||
h = SetEnhMetaFileBits(*lpcbytes, (LPVOID)hdata);
|
||||
h = SetEnhMetaFileBits(*lpcbytes, hdata);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2990,7 +2988,7 @@ static void X11DRV_HandleSelectionRequest( HWND hWnd, XSelectionRequestEvent *ev
|
|||
|
||||
wine_tsx11_lock();
|
||||
XChangeProperty(display, request, rprop, event->target,
|
||||
8, PropModeReplace, (unsigned char *)lpClipData, cBytes);
|
||||
8, PropModeReplace, lpClipData, cBytes);
|
||||
wine_tsx11_unlock();
|
||||
|
||||
GlobalUnlock(hClipData);
|
||||
|
|
|
@ -2643,7 +2643,7 @@ static void X11DRV_DIB_SetImageBits_24( int lines, const BYTE *srcbits,
|
|||
/* Windows only supports one 24bpp DIB format: RGB888 */
|
||||
srcbits+=left*3;
|
||||
for (h = lines - 1; h >= 0; h--) {
|
||||
srcbyte=(const BYTE*)srcbits;
|
||||
srcbyte = srcbits;
|
||||
for (x = left; x < width+left; x++) {
|
||||
XPutPixel(bmpImage, x, h,
|
||||
X11DRV_PALETTE_ToPhysical
|
||||
|
|
|
@ -834,8 +834,8 @@ static void EVENT_DropURLs( HWND hWnd, XClientMessageEvent *event )
|
|||
if( lpDrop ) {
|
||||
WND *pDropWnd = WIN_GetPtr( hWnd );
|
||||
lpDrop->pFiles = sizeof(DROPFILES);
|
||||
lpDrop->pt.x = (INT)x;
|
||||
lpDrop->pt.y = (INT)y;
|
||||
lpDrop->pt.x = x;
|
||||
lpDrop->pt.y = y;
|
||||
lpDrop->fNC =
|
||||
( x < (pDropWnd->rectClient.left - pDropWnd->rectWindow.left) ||
|
||||
y < (pDropWnd->rectClient.top - pDropWnd->rectWindow.top) ||
|
||||
|
|
|
@ -476,14 +476,14 @@ LOAD_FUNCPTR(glXFreeMemoryNV)
|
|||
*/
|
||||
|
||||
if(glxRequireVersion(3)) {
|
||||
pglXChooseFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfig");
|
||||
pglXGetFBConfigAttrib = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttrib");
|
||||
pglXGetVisualFromFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfig");
|
||||
pglXQueryDrawable = (void*)pglXGetProcAddressARB((const GLubyte *) "glXQueryDrawable");
|
||||
pglXChooseFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfig");
|
||||
pglXGetFBConfigAttrib = pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttrib");
|
||||
pglXGetVisualFromFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfig");
|
||||
pglXQueryDrawable = pglXGetProcAddressARB((const GLubyte *) "glXQueryDrawable");
|
||||
} else if(glxRequireExtension("GLX_SGIX_fbconfig")) {
|
||||
pglXChooseFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfigSGIX");
|
||||
pglXGetFBConfigAttrib = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttribSGIX");
|
||||
pglXGetVisualFromFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfigSGIX");
|
||||
pglXChooseFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfigSGIX");
|
||||
pglXGetFBConfigAttrib = pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttribSGIX");
|
||||
pglXGetVisualFromFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfigSGIX");
|
||||
|
||||
/* The mesa libGL client library seems to forward glXQueryDrawable to the Xserver, so only
|
||||
* enable this function when the Xserver understand GLX 1.3 or newer
|
||||
|
@ -491,10 +491,10 @@ LOAD_FUNCPTR(glXFreeMemoryNV)
|
|||
pglXQueryDrawable = NULL;
|
||||
} else if(strcmp("ATI", WineGLInfo.glxClientVendor) == 0) {
|
||||
TRACE("Overriding ATI GLX capabilities!\n");
|
||||
pglXChooseFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfig");
|
||||
pglXGetFBConfigAttrib = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttrib");
|
||||
pglXGetVisualFromFBConfig = (void*)pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfig");
|
||||
pglXQueryDrawable = (void*)pglXGetProcAddressARB((const GLubyte *) "glXQueryDrawable");
|
||||
pglXChooseFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXChooseFBConfig");
|
||||
pglXGetFBConfigAttrib = pglXGetProcAddressARB((const GLubyte *) "glXGetFBConfigAttrib");
|
||||
pglXGetVisualFromFBConfig = pglXGetProcAddressARB((const GLubyte *) "glXGetVisualFromFBConfig");
|
||||
pglXQueryDrawable = pglXGetProcAddressARB((const GLubyte *) "glXQueryDrawable");
|
||||
|
||||
/* Use client GLX information in case of the ATI drivers. We override the
|
||||
* capabilities over here and not somewhere else as ATI might better their
|
||||
|
@ -507,13 +507,13 @@ LOAD_FUNCPTR(glXFreeMemoryNV)
|
|||
|
||||
if(glxRequireExtension("GLX_ATI_render_texture")) {
|
||||
use_render_texture_ati = 1;
|
||||
pglXBindTexImageATI = (void*)pglXGetProcAddressARB((const GLubyte *) "glXBindTexImageATI");
|
||||
pglXReleaseTexImageATI = (void*)pglXGetProcAddressARB((const GLubyte *) "glXReleaseTexImageATI");
|
||||
pglXDrawableAttribATI = (void*)pglXGetProcAddressARB((const GLubyte *) "glXDrawableAttribATI");
|
||||
pglXBindTexImageATI = pglXGetProcAddressARB((const GLubyte *) "glXBindTexImageATI");
|
||||
pglXReleaseTexImageATI = pglXGetProcAddressARB((const GLubyte *) "glXReleaseTexImageATI");
|
||||
pglXDrawableAttribATI = pglXGetProcAddressARB((const GLubyte *) "glXDrawableAttribATI");
|
||||
}
|
||||
|
||||
if(glxRequireExtension("GLX_MESA_copy_sub_buffer")) {
|
||||
pglXCopySubBufferMESA = (void*)pglXGetProcAddressARB((const GLubyte *) "glXCopySubBufferMESA");
|
||||
pglXCopySubBufferMESA = pglXGetProcAddressARB((const GLubyte *) "glXCopySubBufferMESA");
|
||||
}
|
||||
|
||||
X11DRV_WineGL_LoadExtensions();
|
||||
|
@ -1047,7 +1047,7 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEVICE *physDev,
|
|||
if (TRACE_ON(opengl)) {
|
||||
TRACE("(%p,%p)\n", physDev, ppfd);
|
||||
|
||||
dump_PIXELFORMATDESCRIPTOR((const PIXELFORMATDESCRIPTOR *) ppfd);
|
||||
dump_PIXELFORMATDESCRIPTOR(ppfd);
|
||||
}
|
||||
|
||||
wine_tsx11_lock();
|
||||
|
@ -1919,7 +1919,7 @@ static BOOL internal_wglUseFontBitmaps(HDC hdc, DWORD first, DWORD count, DWORD
|
|||
pglNewList(listBase++, GL_COMPILE);
|
||||
if (needed_size != 0) {
|
||||
pglBitmap(gm.gmBlackBoxX, gm.gmBlackBoxY,
|
||||
0 - (int) gm.gmptGlyphOrigin.x, (int) gm.gmBlackBoxY - (int) gm.gmptGlyphOrigin.y,
|
||||
0 - gm.gmptGlyphOrigin.x, (int) gm.gmBlackBoxY - gm.gmptGlyphOrigin.y,
|
||||
gm.gmCellIncX, gm.gmCellIncY,
|
||||
gl_bitmap);
|
||||
} else {
|
||||
|
@ -2320,7 +2320,7 @@ static HPBUFFERARB WINAPI X11DRV_wglCreatePbufferARB(HDC hdc, int iPixelFormat,
|
|||
create_failed:
|
||||
HeapFree(GetProcessHeap(), 0, object);
|
||||
TRACE("->(FAILED)\n");
|
||||
return (HPBUFFERARB) NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -602,7 +602,7 @@ void X11DRV_LoadTabletInfo(HWND hwnddefault)
|
|||
cursor->TYPE = CSR_TYPE_ERASER;
|
||||
|
||||
|
||||
any = (XAnyClassPtr) (target->inputclassinfo);
|
||||
any = target->inputclassinfo;
|
||||
|
||||
for (class_loop = 0; class_loop < target->num_classes; class_loop++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue