From 02f377d5e2dd18537d0807ad63675a0970b5a37d Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 4 Nov 2011 08:57:20 +0100 Subject: xserver pixman mesa git update 4 nov 2011 --- xorg-server/hw/xwin/winmonitors.c | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'xorg-server/hw/xwin/winmonitors.c') diff --git a/xorg-server/hw/xwin/winmonitors.c b/xorg-server/hw/xwin/winmonitors.c index a9d46f90e..967ae6d35 100644 --- a/xorg-server/hw/xwin/winmonitors.c +++ b/xorg-server/hw/xwin/winmonitors.c @@ -53,30 +53,8 @@ wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _d return TRUE; } -typedef WINAPI wBOOL (*ENUMDISPLAYMONITORSPROC)(HDC,LPCRECT,MONITORENUMPROC,LPARAM); -ENUMDISPLAYMONITORSPROC _EnumDisplayMonitors; - -wBOOL CALLBACK getMonitorInfo(HMONITOR hMonitor, HDC hdc, LPRECT rect, LPARAM _data); - Bool QueryMonitor(int index, struct GetMonitorInfoData *data) { - /* Load EnumDisplayMonitors from DLL */ - HMODULE user32; - FARPROC func; - user32 = LoadLibrary("user32.dll"); - if (user32 == NULL) - { - winW32Error(2, "Could not open user32.dll"); - return FALSE; - } - func = GetProcAddress(user32, "EnumDisplayMonitors"); - if (func == NULL) - { - winW32Error(2, "Could not resolve EnumDisplayMonitors: "); - return FALSE; - } - _EnumDisplayMonitors = (ENUMDISPLAYMONITORSPROC)func; - /* prepare data */ if (data == NULL) return FALSE; @@ -84,9 +62,5 @@ Bool QueryMonitor(int index, struct GetMonitorInfoData *data) data->requestedMonitor = index; /* query information */ - _EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); - - /* cleanup */ - FreeLibrary(user32); - return TRUE; + return EnumDisplayMonitors(NULL, NULL, getMonitorInfo, (LPARAM) data); } -- cgit v1.2.3