diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index a2ebd018bca..2042701dd45 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -460,7 +460,24 @@ static INT CDECL nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap ) return pGetSystemMetrics ? pGetSystemMetrics( SM_CYSCREEN ) : 480; } - case BITSPIXEL: return 32; + case BITSPIXEL: + { + DEVMODEW devmode; + WCHAR *display; + DC *dc; + + if (GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY && pEnumDisplaySettingsW) + { + dc = get_nulldrv_dc( dev ); + display = dc->display[0] ? dc->display : NULL; + memset( &devmode, 0, sizeof(devmode) ); + devmode.dmSize = sizeof(devmode); + if (pEnumDisplaySettingsW( display, ENUM_CURRENT_SETTINGS, &devmode ) + && devmode.dmFields & DM_BITSPERPEL && devmode.dmBitsPerPel) + return devmode.dmBitsPerPel; + } + return 32; + } case PLANES: return 1; case NUMBRUSHES: return -1; case NUMPENS: return -1; diff --git a/dlls/user32/tests/monitor.c b/dlls/user32/tests/monitor.c index ab03837f5e6..654f77ed617 100644 --- a/dlls/user32/tests/monitor.c +++ b/dlls/user32/tests/monitor.c @@ -2068,7 +2068,6 @@ static void _check_display_dc(INT line, HDC hdc, const DEVMODEA *dm, BOOL allow_ dm->dmDisplayFrequency, value); value = GetDeviceCaps(hdc, BITSPIXEL); - todo_wine_if(dm->dmBitsPerPel != 32) ok_(__FILE__, line)(value == dm->dmBitsPerPel, "Expected BITSPIXEL %d, got %d.\n", dm->dmBitsPerPel, value); diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index d070c0f1171..ff3d5317697 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -162,8 +162,6 @@ static INT CDECL X11DRV_GetDeviceCaps( PHYSDEV dev, INT cap ) { switch(cap) { - case BITSPIXEL: - return screen_bpp; case SIZEPALETTE: return palette_size; default: