Alexandre Julliard : wineandroid: Add a stub implementation of EnumDisplaySettingsEx.

Alexandre Julliard julliard at winehq.org
Wed Jun 21 16:43:44 CDT 2017


Module: wine
Branch: master
Commit: 1aa8cf05000cfc7f560835dc01ab3afb2f2a2fed
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1aa8cf05000cfc7f560835dc01ab3afb2f2a2fed

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Jun 21 15:53:58 2017 +0200

wineandroid: Add a stub implementation of EnumDisplaySettingsEx.

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wineandroid.drv/init.c               | 39 +++++++++++++++++++++++++++++++
 dlls/wineandroid.drv/wineandroid.drv.spec |  1 +
 2 files changed, 40 insertions(+)

diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c
index 75905a4..54be12a 100644
--- a/dlls/wineandroid.drv/init.c
+++ b/dlls/wineandroid.drv/init.c
@@ -268,6 +268,45 @@ BOOL CDECL ANDROID_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC pr
 }
 
 
+/***********************************************************************
+ *           ANDROID_EnumDisplaySettingsEx
+ */
+BOOL CDECL ANDROID_EnumDisplaySettingsEx( LPCWSTR name, DWORD n, LPDEVMODEW devmode, DWORD flags)
+{
+    static const WCHAR dev_name[CCHDEVICENAME] =
+        { 'W','i','n','e',' ','A','n','d','r','o','i','d',' ','d','r','i','v','e','r',0 };
+
+    devmode->dmSize = offsetof( DEVMODEW, dmICMMethod );
+    devmode->dmSpecVersion = DM_SPECVERSION;
+    devmode->dmDriverVersion = DM_SPECVERSION;
+    memcpy( devmode->dmDeviceName, dev_name, sizeof(dev_name) );
+    devmode->dmDriverExtra = 0;
+    devmode->u2.dmDisplayFlags = 0;
+    devmode->dmDisplayFrequency = 0;
+    devmode->u1.s2.dmPosition.x = 0;
+    devmode->u1.s2.dmPosition.y = 0;
+    devmode->u1.s2.dmDisplayOrientation = 0;
+    devmode->u1.s2.dmDisplayFixedOutput = 0;
+
+    if (n == ENUM_CURRENT_SETTINGS || n == ENUM_REGISTRY_SETTINGS) n = 0;
+    if (n == 0)
+    {
+        devmode->dmPelsWidth = screen_width;
+        devmode->dmPelsHeight = screen_height;
+        devmode->dmBitsPerPel = screen_bpp;
+        devmode->dmDisplayFrequency = 60;
+        devmode->dmFields = DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY;
+        TRACE( "mode %d -- %dx%d %d bpp @%d Hz\n", n,
+               devmode->dmPelsWidth, devmode->dmPelsHeight,
+               devmode->dmBitsPerPel, devmode->dmDisplayFrequency );
+        return TRUE;
+    }
+    TRACE( "mode %d -- not present\n", n );
+    SetLastError( ERROR_NO_MORE_FILES );
+    return FALSE;
+}
+
+
 static const struct gdi_dc_funcs android_drv_funcs =
 {
     NULL,                               /* pAbortDoc */
diff --git a/dlls/wineandroid.drv/wineandroid.drv.spec b/dlls/wineandroid.drv/wineandroid.drv.spec
index 8e98baa..3439ff6 100644
--- a/dlls/wineandroid.drv/wineandroid.drv.spec
+++ b/dlls/wineandroid.drv/wineandroid.drv.spec
@@ -11,6 +11,7 @@
 @ cdecl VkKeyScanEx(long long) ANDROID_VkKeyScanEx
 @ cdecl ChangeDisplaySettingsEx(ptr ptr long long long) ANDROID_ChangeDisplaySettingsEx
 @ cdecl EnumDisplayMonitors(long ptr ptr long) ANDROID_EnumDisplayMonitors
+@ cdecl EnumDisplaySettingsEx(ptr long ptr long) ANDROID_EnumDisplaySettingsEx
 @ cdecl GetMonitorInfo(long ptr) ANDROID_GetMonitorInfo
 @ cdecl CreateWindow(long) ANDROID_CreateWindow
 @ cdecl DestroyWindow(long) ANDROID_DestroyWindow




More information about the wine-cvs mailing list