winex11: Use standard dlopen() instead of the libwine wrappers.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
73effb1ab6
commit
7afa53c0f2
|
@ -87,7 +87,6 @@
|
|||
#include "shlobj.h"
|
||||
#include "shellapi.h"
|
||||
#include "shlwapi.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/unicode.h"
|
||||
|
@ -1986,14 +1985,14 @@ static void xfixes_init(void)
|
|||
int major = 3, minor = 0;
|
||||
void *handle;
|
||||
|
||||
handle = wine_dlopen(SONAME_LIBXFIXES, RTLD_NOW, NULL, 0);
|
||||
handle = dlopen(SONAME_LIBXFIXES, RTLD_NOW);
|
||||
if (!handle) return;
|
||||
|
||||
pXFixesQueryExtension = wine_dlsym(handle, "XFixesQueryExtension", NULL, 0);
|
||||
pXFixesQueryExtension = dlsym(handle, "XFixesQueryExtension");
|
||||
if (!pXFixesQueryExtension) return;
|
||||
pXFixesQueryVersion = wine_dlsym(handle, "XFixesQueryVersion", NULL, 0);
|
||||
pXFixesQueryVersion = dlsym(handle, "XFixesQueryVersion");
|
||||
if (!pXFixesQueryVersion) return;
|
||||
pXFixesSelectSelectionInput = wine_dlsym(handle, "XFixesSelectSelectionInput", NULL, 0);
|
||||
pXFixesSelectSelectionInput = dlsym(handle, "XFixesSelectSelectionInput");
|
||||
if (!pXFixesSelectSelectionInput) return;
|
||||
|
||||
if (!pXFixesQueryExtension(clipboard_display, &event_base, &error_base))
|
||||
|
|
|
@ -51,7 +51,6 @@ MAKE_FUNCPTR(XcursorLibraryLoadCursor);
|
|||
|
||||
#include "x11drv.h"
|
||||
#include "wine/server.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -151,14 +150,13 @@ MAKE_FUNCPTR(XISelectEvents);
|
|||
void X11DRV_Xcursor_Init(void)
|
||||
{
|
||||
#ifdef SONAME_LIBXCURSOR
|
||||
xcursor_handle = wine_dlopen(SONAME_LIBXCURSOR, RTLD_NOW, NULL, 0);
|
||||
if (!xcursor_handle) /* wine_dlopen failed. */
|
||||
xcursor_handle = dlopen(SONAME_LIBXCURSOR, RTLD_NOW);
|
||||
if (!xcursor_handle)
|
||||
{
|
||||
WARN("Xcursor failed to load. Using fallback code.\n");
|
||||
return;
|
||||
}
|
||||
#define LOAD_FUNCPTR(f) \
|
||||
p##f = wine_dlsym(xcursor_handle, #f, NULL, 0)
|
||||
#define LOAD_FUNCPTR(f) p##f = dlsym(xcursor_handle, #f)
|
||||
|
||||
LOAD_FUNCPTR(XcursorImageCreate);
|
||||
LOAD_FUNCPTR(XcursorImageDestroy);
|
||||
|
@ -1868,7 +1866,7 @@ void X11DRV_XInput2_Init(void)
|
|||
{
|
||||
#if defined(SONAME_LIBXI) && defined(HAVE_X11_EXTENSIONS_XINPUT2_H)
|
||||
int event, error;
|
||||
void *libxi_handle = wine_dlopen( SONAME_LIBXI, RTLD_NOW, NULL, 0 );
|
||||
void *libxi_handle = dlopen( SONAME_LIBXI, RTLD_NOW );
|
||||
|
||||
if (!libxi_handle)
|
||||
{
|
||||
|
@ -1876,7 +1874,7 @@ void X11DRV_XInput2_Init(void)
|
|||
return;
|
||||
}
|
||||
#define LOAD_FUNCPTR(f) \
|
||||
if (!(p##f = wine_dlsym( libxi_handle, #f, NULL, 0))) \
|
||||
if (!(p##f = dlsym( libxi_handle, #f))) \
|
||||
{ \
|
||||
WARN("Failed to load %s.\n", #f); \
|
||||
return; \
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#include "x11drv.h"
|
||||
#include "xcomposite.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
#ifdef SONAME_LIBGL
|
||||
|
@ -545,23 +544,22 @@ static void *opengl_handle;
|
|||
|
||||
static BOOL WINAPI init_opengl( INIT_ONCE *once, void *param, void **context )
|
||||
{
|
||||
char buffer[200];
|
||||
int error_base, event_base;
|
||||
unsigned int i;
|
||||
|
||||
/* No need to load any other libraries as according to the ABI, libGL should be self-sufficient
|
||||
and include all dependencies */
|
||||
opengl_handle = wine_dlopen(SONAME_LIBGL, RTLD_NOW|RTLD_GLOBAL, buffer, sizeof(buffer));
|
||||
opengl_handle = dlopen( SONAME_LIBGL, RTLD_NOW | RTLD_GLOBAL );
|
||||
if (opengl_handle == NULL)
|
||||
{
|
||||
ERR( "Failed to load libGL: %s\n", buffer );
|
||||
ERR( "Failed to load libGL: %s\n", dlerror() );
|
||||
ERR( "OpenGL support is disabled.\n");
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE( opengl_func_names ); i++)
|
||||
{
|
||||
if (!(((void **)&opengl_funcs.gl)[i] = wine_dlsym( opengl_handle, opengl_func_names[i], NULL, 0 )))
|
||||
if (!(((void **)&opengl_funcs.gl)[i] = dlsym( opengl_handle, opengl_func_names[i] )))
|
||||
{
|
||||
ERR( "%s not found in libGL, disabling OpenGL.\n", opengl_func_names[i] );
|
||||
goto failed;
|
||||
|
@ -576,7 +574,7 @@ static BOOL WINAPI init_opengl( INIT_ONCE *once, void *param, void **context )
|
|||
REDIRECT( glGetString );
|
||||
#undef REDIRECT
|
||||
|
||||
pglXGetProcAddressARB = wine_dlsym(opengl_handle, "glXGetProcAddressARB", NULL, 0);
|
||||
pglXGetProcAddressARB = dlsym(opengl_handle, "glXGetProcAddressARB");
|
||||
if (pglXGetProcAddressARB == NULL) {
|
||||
ERR("Could not find glXGetProcAddressARB in libGL, disabling OpenGL.\n");
|
||||
goto failed;
|
||||
|
@ -727,7 +725,7 @@ static BOOL WINAPI init_opengl( INIT_ONCE *once, void *param, void **context )
|
|||
return TRUE;
|
||||
|
||||
failed:
|
||||
wine_dlclose(opengl_handle, NULL, 0);
|
||||
dlclose(opengl_handle);
|
||||
opengl_handle = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/library.h"
|
||||
#include "x11drv.h"
|
||||
|
||||
#define VK_NO_PROTOTYPES
|
||||
|
@ -107,34 +106,34 @@ static void *vulkan_handle;
|
|||
|
||||
static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
|
||||
{
|
||||
if (!(vulkan_handle = wine_dlopen(SONAME_LIBVULKAN, RTLD_NOW, NULL, 0)))
|
||||
if (!(vulkan_handle = dlopen(SONAME_LIBVULKAN, RTLD_NOW)))
|
||||
{
|
||||
ERR("Failed to load %s.\n", SONAME_LIBVULKAN);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) if (!(p##f = wine_dlsym(vulkan_handle, #f, NULL, 0))) goto fail;
|
||||
#define LOAD_OPTIONAL_FUNCPTR(f) p##f = wine_dlsym(vulkan_handle, #f, NULL, 0);
|
||||
LOAD_FUNCPTR(vkCreateInstance)
|
||||
LOAD_FUNCPTR(vkCreateSwapchainKHR)
|
||||
LOAD_FUNCPTR(vkCreateXlibSurfaceKHR)
|
||||
LOAD_FUNCPTR(vkDestroyInstance)
|
||||
LOAD_FUNCPTR(vkDestroySurfaceKHR)
|
||||
LOAD_FUNCPTR(vkDestroySwapchainKHR)
|
||||
LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties)
|
||||
LOAD_FUNCPTR(vkGetDeviceProcAddr)
|
||||
LOAD_FUNCPTR(vkGetInstanceProcAddr)
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilities2KHR)
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR)
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR)
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfacePresentModesKHR)
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceSupportKHR)
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR)
|
||||
LOAD_FUNCPTR(vkGetSwapchainImagesKHR)
|
||||
LOAD_FUNCPTR(vkQueuePresentKHR)
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR)
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR)
|
||||
#define LOAD_FUNCPTR(f) if (!(p##f = dlsym(vulkan_handle, #f))) goto fail
|
||||
#define LOAD_OPTIONAL_FUNCPTR(f) p##f = dlsym(vulkan_handle, #f)
|
||||
LOAD_FUNCPTR(vkCreateInstance);
|
||||
LOAD_FUNCPTR(vkCreateSwapchainKHR);
|
||||
LOAD_FUNCPTR(vkCreateXlibSurfaceKHR);
|
||||
LOAD_FUNCPTR(vkDestroyInstance);
|
||||
LOAD_FUNCPTR(vkDestroySurfaceKHR);
|
||||
LOAD_FUNCPTR(vkDestroySwapchainKHR);
|
||||
LOAD_FUNCPTR(vkEnumerateInstanceExtensionProperties);
|
||||
LOAD_FUNCPTR(vkGetDeviceProcAddr);
|
||||
LOAD_FUNCPTR(vkGetInstanceProcAddr);
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilities2KHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceCapabilitiesKHR);
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDeviceSurfaceFormats2KHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceFormatsKHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfacePresentModesKHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceSurfaceSupportKHR);
|
||||
LOAD_FUNCPTR(vkGetPhysicalDeviceXlibPresentationSupportKHR);
|
||||
LOAD_FUNCPTR(vkGetSwapchainImagesKHR);
|
||||
LOAD_FUNCPTR(vkQueuePresentKHR);
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetDeviceGroupSurfacePresentModesKHR);
|
||||
LOAD_OPTIONAL_FUNCPTR(vkGetPhysicalDevicePresentRectanglesKHR);
|
||||
#undef LOAD_FUNCPTR
|
||||
#undef LOAD_OPTIONAL_FUNCPTR
|
||||
|
||||
|
@ -143,7 +142,7 @@ static BOOL WINAPI wine_vk_init(INIT_ONCE *once, void *param, void **context)
|
|||
return TRUE;
|
||||
|
||||
fail:
|
||||
wine_dlclose(vulkan_handle, NULL, 0);
|
||||
dlclose(vulkan_handle);
|
||||
vulkan_handle = NULL;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
#include "winbase.h"
|
||||
#include "winnls.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wintab.h"
|
||||
|
@ -327,18 +326,18 @@ MAKE_FUNCPTR(XFreeDeviceState)
|
|||
|
||||
static INT X11DRV_XInput_Init(void)
|
||||
{
|
||||
xinput_handle = wine_dlopen(SONAME_LIBXI, RTLD_NOW, NULL, 0);
|
||||
xinput_handle = dlopen(SONAME_LIBXI, RTLD_NOW);
|
||||
if (xinput_handle)
|
||||
{
|
||||
#define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(xinput_handle, #f, NULL, 0)) == NULL) goto sym_not_found;
|
||||
LOAD_FUNCPTR(XListInputDevices)
|
||||
LOAD_FUNCPTR(XFreeDeviceList)
|
||||
LOAD_FUNCPTR(XOpenDevice)
|
||||
LOAD_FUNCPTR(XGetDeviceButtonMapping)
|
||||
LOAD_FUNCPTR(XCloseDevice)
|
||||
LOAD_FUNCPTR(XSelectExtensionEvent)
|
||||
LOAD_FUNCPTR(XQueryDeviceState)
|
||||
LOAD_FUNCPTR(XFreeDeviceState)
|
||||
#define LOAD_FUNCPTR(f) if((p##f = dlsym(xinput_handle, #f)) == NULL) goto sym_not_found
|
||||
LOAD_FUNCPTR(XListInputDevices);
|
||||
LOAD_FUNCPTR(XFreeDeviceList);
|
||||
LOAD_FUNCPTR(XOpenDevice);
|
||||
LOAD_FUNCPTR(XGetDeviceButtonMapping);
|
||||
LOAD_FUNCPTR(XCloseDevice);
|
||||
LOAD_FUNCPTR(XSelectExtensionEvent);
|
||||
LOAD_FUNCPTR(XQueryDeviceState);
|
||||
LOAD_FUNCPTR(XFreeDeviceState);
|
||||
#undef LOAD_FUNCPTR
|
||||
return 1;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,6 @@
|
|||
#include "wine/server.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/list.h"
|
||||
#include "wine/heap.h"
|
||||
|
||||
|
@ -461,7 +460,7 @@ static int xcomp_error_base;
|
|||
|
||||
static void X11DRV_XComposite_Init(void)
|
||||
{
|
||||
void *xcomposite_handle = wine_dlopen(SONAME_LIBXCOMPOSITE, RTLD_NOW, NULL, 0);
|
||||
void *xcomposite_handle = dlopen(SONAME_LIBXCOMPOSITE, RTLD_NOW);
|
||||
if (!xcomposite_handle)
|
||||
{
|
||||
TRACE("Unable to open %s, XComposite disabled\n", SONAME_LIBXCOMPOSITE);
|
||||
|
@ -470,23 +469,22 @@ static void X11DRV_XComposite_Init(void)
|
|||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) \
|
||||
if((p##f = wine_dlsym(xcomposite_handle, #f, NULL, 0)) == NULL) \
|
||||
goto sym_not_found;
|
||||
LOAD_FUNCPTR(XCompositeQueryExtension)
|
||||
LOAD_FUNCPTR(XCompositeQueryVersion)
|
||||
LOAD_FUNCPTR(XCompositeVersion)
|
||||
LOAD_FUNCPTR(XCompositeRedirectWindow)
|
||||
LOAD_FUNCPTR(XCompositeRedirectSubwindows)
|
||||
LOAD_FUNCPTR(XCompositeUnredirectWindow)
|
||||
LOAD_FUNCPTR(XCompositeUnredirectSubwindows)
|
||||
LOAD_FUNCPTR(XCompositeCreateRegionFromBorderClip)
|
||||
LOAD_FUNCPTR(XCompositeNameWindowPixmap)
|
||||
if((p##f = dlsym(xcomposite_handle, #f)) == NULL) goto sym_not_found
|
||||
LOAD_FUNCPTR(XCompositeQueryExtension);
|
||||
LOAD_FUNCPTR(XCompositeQueryVersion);
|
||||
LOAD_FUNCPTR(XCompositeVersion);
|
||||
LOAD_FUNCPTR(XCompositeRedirectWindow);
|
||||
LOAD_FUNCPTR(XCompositeRedirectSubwindows);
|
||||
LOAD_FUNCPTR(XCompositeUnredirectWindow);
|
||||
LOAD_FUNCPTR(XCompositeUnredirectSubwindows);
|
||||
LOAD_FUNCPTR(XCompositeCreateRegionFromBorderClip);
|
||||
LOAD_FUNCPTR(XCompositeNameWindowPixmap);
|
||||
#undef LOAD_FUNCPTR
|
||||
|
||||
if(!pXCompositeQueryExtension(gdi_display, &xcomp_event_base,
|
||||
&xcomp_error_base)) {
|
||||
TRACE("XComposite extension could not be queried; disabled\n");
|
||||
wine_dlclose(xcomposite_handle, NULL, 0);
|
||||
dlclose(xcomposite_handle);
|
||||
xcomposite_handle = NULL;
|
||||
usexcomposite = FALSE;
|
||||
return;
|
||||
|
@ -496,7 +494,7 @@ static void X11DRV_XComposite_Init(void)
|
|||
|
||||
sym_not_found:
|
||||
TRACE("Unable to load function pointers from %s, XComposite disabled\n", SONAME_LIBXCOMPOSITE);
|
||||
wine_dlclose(xcomposite_handle, NULL, 0);
|
||||
dlclose(xcomposite_handle);
|
||||
xcomposite_handle = NULL;
|
||||
usexcomposite = FALSE;
|
||||
}
|
||||
|
@ -560,19 +558,18 @@ static void init_visuals( Display *display, int screen )
|
|||
*/
|
||||
static BOOL process_attach(void)
|
||||
{
|
||||
char error[1024];
|
||||
Display *display;
|
||||
void *libx11 = wine_dlopen( SONAME_LIBX11, RTLD_NOW|RTLD_GLOBAL, error, sizeof(error) );
|
||||
void *libx11 = dlopen( SONAME_LIBX11, RTLD_NOW|RTLD_GLOBAL );
|
||||
|
||||
if (!libx11)
|
||||
{
|
||||
ERR( "failed to load %s: %s\n", SONAME_LIBX11, error );
|
||||
ERR( "failed to load %s: %s\n", SONAME_LIBX11, dlerror() );
|
||||
return FALSE;
|
||||
}
|
||||
pXGetEventData = wine_dlsym( libx11, "XGetEventData", NULL, 0 );
|
||||
pXFreeEventData = wine_dlsym( libx11, "XFreeEventData", NULL, 0 );
|
||||
pXGetEventData = dlsym( libx11, "XGetEventData" );
|
||||
pXFreeEventData = dlsym( libx11, "XFreeEventData" );
|
||||
#ifdef SONAME_LIBXEXT
|
||||
wine_dlopen( SONAME_LIBXEXT, RTLD_NOW|RTLD_GLOBAL, NULL, 0 );
|
||||
dlopen( SONAME_LIBXEXT, RTLD_NOW|RTLD_GLOBAL );
|
||||
#endif
|
||||
|
||||
setup_options();
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
#ifdef HAVE_X11_EXTENSIONS_XINERAMA_H
|
||||
#include <X11/extensions/Xinerama.h>
|
||||
#endif
|
||||
#include "wine/library.h"
|
||||
#include "x11drv.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
|
@ -86,14 +85,14 @@ static void load_xinerama(void)
|
|||
{
|
||||
void *handle;
|
||||
|
||||
if (!(handle = wine_dlopen(SONAME_LIBXINERAMA, RTLD_NOW, NULL, 0)))
|
||||
if (!(handle = dlopen(SONAME_LIBXINERAMA, RTLD_NOW)))
|
||||
{
|
||||
WARN( "failed to open %s\n", SONAME_LIBXINERAMA );
|
||||
return;
|
||||
}
|
||||
pXineramaQueryExtension = wine_dlsym( handle, "XineramaQueryExtension", NULL, 0 );
|
||||
pXineramaQueryExtension = dlsym( handle, "XineramaQueryExtension" );
|
||||
if (!pXineramaQueryExtension) WARN( "XineramaQueryScreens not found\n" );
|
||||
pXineramaQueryScreens = wine_dlsym( handle, "XineramaQueryScreens", NULL, 0 );
|
||||
pXineramaQueryScreens = dlsym( handle, "XineramaQueryScreens" );
|
||||
if (!pXineramaQueryScreens) WARN( "XineramaQueryScreens not found\n" );
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,6 @@ WINE_DECLARE_DEBUG_CHANNEL(winediag);
|
|||
#include "x11drv.h"
|
||||
|
||||
#include "wine/heap.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/unicode.h"
|
||||
|
||||
static void *xrandr_handle;
|
||||
|
@ -88,46 +87,45 @@ static int load_xrandr(void)
|
|||
{
|
||||
int r = 0;
|
||||
|
||||
if (wine_dlopen(SONAME_LIBXRENDER, RTLD_NOW|RTLD_GLOBAL, NULL, 0) &&
|
||||
(xrandr_handle = wine_dlopen(SONAME_LIBXRANDR, RTLD_NOW, NULL, 0)))
|
||||
if (dlopen(SONAME_LIBXRENDER, RTLD_NOW|RTLD_GLOBAL) &&
|
||||
(xrandr_handle = dlopen(SONAME_LIBXRANDR, RTLD_NOW)))
|
||||
{
|
||||
|
||||
#define LOAD_FUNCPTR(f) \
|
||||
if((p##f = wine_dlsym(xrandr_handle, #f, NULL, 0)) == NULL) \
|
||||
goto sym_not_found;
|
||||
if((p##f = dlsym(xrandr_handle, #f)) == NULL) goto sym_not_found
|
||||
|
||||
LOAD_FUNCPTR(XRRConfigCurrentConfiguration)
|
||||
LOAD_FUNCPTR(XRRConfigCurrentRate)
|
||||
LOAD_FUNCPTR(XRRFreeScreenConfigInfo)
|
||||
LOAD_FUNCPTR(XRRGetScreenInfo)
|
||||
LOAD_FUNCPTR(XRRQueryExtension)
|
||||
LOAD_FUNCPTR(XRRQueryVersion)
|
||||
LOAD_FUNCPTR(XRRRates)
|
||||
LOAD_FUNCPTR(XRRSetScreenConfig)
|
||||
LOAD_FUNCPTR(XRRSetScreenConfigAndRate)
|
||||
LOAD_FUNCPTR(XRRSizes)
|
||||
LOAD_FUNCPTR(XRRConfigCurrentConfiguration);
|
||||
LOAD_FUNCPTR(XRRConfigCurrentRate);
|
||||
LOAD_FUNCPTR(XRRFreeScreenConfigInfo);
|
||||
LOAD_FUNCPTR(XRRGetScreenInfo);
|
||||
LOAD_FUNCPTR(XRRQueryExtension);
|
||||
LOAD_FUNCPTR(XRRQueryVersion);
|
||||
LOAD_FUNCPTR(XRRRates);
|
||||
LOAD_FUNCPTR(XRRSetScreenConfig);
|
||||
LOAD_FUNCPTR(XRRSetScreenConfigAndRate);
|
||||
LOAD_FUNCPTR(XRRSizes);
|
||||
r = 1;
|
||||
|
||||
#ifdef HAVE_XRRGETSCREENRESOURCES
|
||||
LOAD_FUNCPTR(XRRFreeCrtcInfo)
|
||||
LOAD_FUNCPTR(XRRFreeOutputInfo)
|
||||
LOAD_FUNCPTR(XRRFreeScreenResources)
|
||||
LOAD_FUNCPTR(XRRGetCrtcInfo)
|
||||
LOAD_FUNCPTR(XRRGetOutputInfo)
|
||||
LOAD_FUNCPTR(XRRGetScreenResources)
|
||||
LOAD_FUNCPTR(XRRGetScreenSizeRange)
|
||||
LOAD_FUNCPTR(XRRSetCrtcConfig)
|
||||
LOAD_FUNCPTR(XRRSetScreenSize)
|
||||
LOAD_FUNCPTR(XRRFreeCrtcInfo);
|
||||
LOAD_FUNCPTR(XRRFreeOutputInfo);
|
||||
LOAD_FUNCPTR(XRRFreeScreenResources);
|
||||
LOAD_FUNCPTR(XRRGetCrtcInfo);
|
||||
LOAD_FUNCPTR(XRRGetOutputInfo);
|
||||
LOAD_FUNCPTR(XRRGetScreenResources);
|
||||
LOAD_FUNCPTR(XRRGetScreenSizeRange);
|
||||
LOAD_FUNCPTR(XRRSetCrtcConfig);
|
||||
LOAD_FUNCPTR(XRRSetScreenSize);
|
||||
r = 2;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XRRGETPROVIDERRESOURCES
|
||||
LOAD_FUNCPTR(XRRSelectInput)
|
||||
LOAD_FUNCPTR(XRRGetOutputPrimary)
|
||||
LOAD_FUNCPTR(XRRGetProviderResources)
|
||||
LOAD_FUNCPTR(XRRFreeProviderResources)
|
||||
LOAD_FUNCPTR(XRRGetProviderInfo)
|
||||
LOAD_FUNCPTR(XRRFreeProviderInfo)
|
||||
LOAD_FUNCPTR(XRRSelectInput);
|
||||
LOAD_FUNCPTR(XRRGetOutputPrimary);
|
||||
LOAD_FUNCPTR(XRRGetProviderResources);
|
||||
LOAD_FUNCPTR(XRRFreeProviderResources);
|
||||
LOAD_FUNCPTR(XRRGetProviderInfo);
|
||||
LOAD_FUNCPTR(XRRFreeProviderInfo);
|
||||
r = 4;
|
||||
#endif
|
||||
|
||||
|
@ -1120,7 +1118,7 @@ void X11DRV_XRandR_Init(void)
|
|||
if (ret >= 2 && (major > 1 || (major == 1 && minor >= 2)))
|
||||
{
|
||||
if (major > 1 || (major == 1 && minor >= 3))
|
||||
pXRRGetScreenResourcesCurrent = wine_dlsym( xrandr_handle, "XRRGetScreenResourcesCurrent", NULL, 0 );
|
||||
pXRRGetScreenResourcesCurrent = dlsym( xrandr_handle, "XRRGetScreenResourcesCurrent" );
|
||||
if (!pXRRGetScreenResourcesCurrent)
|
||||
pXRRGetScreenResourcesCurrent = pXRRGetScreenResources;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "winbase.h"
|
||||
#include "x11drv.h"
|
||||
#include "winternl.h"
|
||||
#include "wine/library.h"
|
||||
#include "wine/unicode.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
|
@ -326,10 +325,10 @@ const struct gdi_dc_funcs *X11DRV_XRender_Init(void)
|
|||
int event_base, i;
|
||||
|
||||
if (!client_side_with_render) return NULL;
|
||||
if (!(xrender_handle = wine_dlopen(SONAME_LIBXRENDER, RTLD_NOW, NULL, 0))) return NULL;
|
||||
if (!(xrender_handle = dlopen(SONAME_LIBXRENDER, RTLD_NOW))) return NULL;
|
||||
|
||||
#define LOAD_FUNCPTR(f) if((p##f = wine_dlsym(xrender_handle, #f, NULL, 0)) == NULL) return NULL
|
||||
#define LOAD_OPTIONAL_FUNCPTR(f) p##f = wine_dlsym(xrender_handle, #f, NULL, 0)
|
||||
#define LOAD_FUNCPTR(f) if((p##f = dlsym(xrender_handle, #f)) == NULL) return NULL
|
||||
#define LOAD_OPTIONAL_FUNCPTR(f) p##f = dlsym(xrender_handle, #f)
|
||||
LOAD_FUNCPTR(XRenderAddGlyphs);
|
||||
LOAD_FUNCPTR(XRenderChangePicture);
|
||||
LOAD_FUNCPTR(XRenderComposite);
|
||||
|
|
|
@ -38,7 +38,6 @@
|
|||
#include "wingdi.h"
|
||||
#include "wine/debug.h"
|
||||
#include "wine/heap.h"
|
||||
#include "wine/library.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(xvidmode);
|
||||
|
||||
|
@ -160,7 +159,7 @@ void X11DRV_XF86VM_Init(void)
|
|||
|
||||
if (xf86vm_major) return; /* already initialized? */
|
||||
|
||||
xvidmode_handle = wine_dlopen(SONAME_LIBXXF86VM, RTLD_NOW, NULL, 0);
|
||||
xvidmode_handle = dlopen(SONAME_LIBXXF86VM, RTLD_NOW);
|
||||
if (!xvidmode_handle)
|
||||
{
|
||||
TRACE("Unable to open %s, XVidMode disabled\n", SONAME_LIBXXF86VM);
|
||||
|
@ -169,23 +168,22 @@ void X11DRV_XF86VM_Init(void)
|
|||
}
|
||||
|
||||
#define LOAD_FUNCPTR(f) \
|
||||
if((p##f = wine_dlsym(xvidmode_handle, #f, NULL, 0)) == NULL) \
|
||||
goto sym_not_found;
|
||||
LOAD_FUNCPTR(XF86VidModeGetAllModeLines)
|
||||
LOAD_FUNCPTR(XF86VidModeGetModeLine)
|
||||
LOAD_FUNCPTR(XF86VidModeLockModeSwitch)
|
||||
LOAD_FUNCPTR(XF86VidModeQueryExtension)
|
||||
LOAD_FUNCPTR(XF86VidModeQueryVersion)
|
||||
LOAD_FUNCPTR(XF86VidModeSetViewPort)
|
||||
LOAD_FUNCPTR(XF86VidModeSwitchToMode)
|
||||
if((p##f = dlsym(xvidmode_handle, #f)) == NULL) goto sym_not_found
|
||||
LOAD_FUNCPTR(XF86VidModeGetAllModeLines);
|
||||
LOAD_FUNCPTR(XF86VidModeGetModeLine);
|
||||
LOAD_FUNCPTR(XF86VidModeLockModeSwitch);
|
||||
LOAD_FUNCPTR(XF86VidModeQueryExtension);
|
||||
LOAD_FUNCPTR(XF86VidModeQueryVersion);
|
||||
LOAD_FUNCPTR(XF86VidModeSetViewPort);
|
||||
LOAD_FUNCPTR(XF86VidModeSwitchToMode);
|
||||
#ifdef X_XF86VidModeSetGamma
|
||||
LOAD_FUNCPTR(XF86VidModeGetGamma)
|
||||
LOAD_FUNCPTR(XF86VidModeSetGamma)
|
||||
LOAD_FUNCPTR(XF86VidModeGetGamma);
|
||||
LOAD_FUNCPTR(XF86VidModeSetGamma);
|
||||
#endif
|
||||
#ifdef X_XF86VidModeSetGammaRamp
|
||||
LOAD_FUNCPTR(XF86VidModeGetGammaRamp)
|
||||
LOAD_FUNCPTR(XF86VidModeGetGammaRampSize)
|
||||
LOAD_FUNCPTR(XF86VidModeSetGammaRamp)
|
||||
LOAD_FUNCPTR(XF86VidModeGetGammaRamp);
|
||||
LOAD_FUNCPTR(XF86VidModeGetGammaRampSize);
|
||||
LOAD_FUNCPTR(XF86VidModeSetGammaRamp);
|
||||
#endif
|
||||
#undef LOAD_FUNCPTR
|
||||
|
||||
|
@ -242,7 +240,7 @@ void X11DRV_XF86VM_Init(void)
|
|||
|
||||
sym_not_found:
|
||||
TRACE("Unable to load function pointers from %s, XVidMode disabled\n", SONAME_LIBXXF86VM);
|
||||
wine_dlclose(xvidmode_handle, NULL, 0);
|
||||
dlclose(xvidmode_handle);
|
||||
xvidmode_handle = NULL;
|
||||
usexvidmode = FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue