Commit 68feed7e authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

winex11.drv: Remove unneeded casts.

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