diff options
author | Bjoern Breitmeyer <bjoern.breitmeyer@kdab.com> | 2012-05-10 14:43:26 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-05-10 22:56:25 +0200 |
commit | 9b9895de8da08776e586f20807d4698e5d9e5680 (patch) | |
tree | c76d3316e75c93a6c993f0fea148f496cd3b291a /src/plugins/platforms/windows/qwindowsscreen.cpp | |
parent | 4e8c20e97e17881e2de20640f81c3998f024287d (diff) |
Fix for windows platform plugin to work with WINCE.
Made opengl optional.
Made Clipboard and Accessability optional.
Moved internal mime data into its on source file,
was implemented in the clipboard source
which is just strange.
Change-Id: I6ddf0c656533bd45e22e24492fc2254d15b7822f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsscreen.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsscreen.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowsscreen.cpp b/src/plugins/platforms/windows/qwindowsscreen.cpp index cc694fe0ea..0c24ff7aa6 100644 --- a/src/plugins/platforms/windows/qwindowsscreen.cpp +++ b/src/plugins/platforms/windows/qwindowsscreen.cpp @@ -99,7 +99,14 @@ BOOL QT_WIN_CALLBACK monitorEnumCallback(HMONITOR hMonitor, HDC, LPRECT, LPARAM WindowsScreenDataList *result = reinterpret_cast<WindowsScreenDataList *>(p); QWindowsScreenData data; data.geometry = QRect(QPoint(info.rcMonitor.left, info.rcMonitor.top), QPoint(info.rcMonitor.right - 1, info.rcMonitor.bottom - 1)); - if (HDC hdc = CreateDC(info.szDevice, NULL, NULL, NULL)) { +#ifdef Q_OS_WINCE + //Windows CE, just supports one Display and expects to get only DISPLAY, + //instead of DISPLAY0 and so on, which are passed by info.szDevice + HDC hdc = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL); +#else + HDC hdc = CreateDC(info.szDevice, NULL, NULL, NULL); +#endif + if (hdc) { data.dpi = deviceDPI(hdc); data.depth = GetDeviceCaps(hdc, BITSPIXEL); data.format = data.depth == 16 ? QImage::Format_RGB16 : QImage::Format_RGB32; |