From: Rémi Bernon rbernon@codeweavers.com
--- dlls/win32u/driver.c | 12 ------- dlls/winemac.drv/display.c | 9 ----- dlls/winemac.drv/gdi.c | 1 - dlls/winemac.drv/macdrv.h | 1 - dlls/winex11.drv/display.c | 73 -------------------------------------- dlls/winex11.drv/init.c | 1 - dlls/winex11.drv/x11drv.h | 1 - include/wine/gdi_driver.h | 3 +- 8 files changed, 1 insertion(+), 100 deletions(-)
diff --git a/dlls/win32u/driver.c b/dlls/win32u/driver.c index 54e5c04fce9..628b6f92c23 100644 --- a/dlls/win32u/driver.c +++ b/dlls/win32u/driver.c @@ -761,11 +761,6 @@ static BOOL nulldrv_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LP return FALSE; /* use default implementation */ }
-static INT nulldrv_GetDisplayDepth( LPCWSTR name, BOOL is_primary ) -{ - return -1; /* use default implementation */ -} - static UINT nulldrv_UpdateDisplayDevices( const struct gdi_device_manager *manager, void *param ) { return STATUS_NOT_IMPLEMENTED; @@ -1120,11 +1115,6 @@ static BOOL loaderdrv_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, return load_driver()->pGetCurrentDisplaySettings( name, is_primary, mode ); }
-static INT loaderdrv_GetDisplayDepth( LPCWSTR name, BOOL is_primary ) -{ - return load_driver()->pGetDisplayDepth( name, is_primary ); -} - static void loaderdrv_SetCursor( HWND hwnd, HCURSOR cursor ) { load_driver()->pSetCursor( hwnd, cursor ); @@ -1273,7 +1263,6 @@ static const struct user_driver_funcs lazy_load_driver = /* display modes */ loaderdrv_ChangeDisplaySettings, loaderdrv_GetCurrentDisplaySettings, - loaderdrv_GetDisplayDepth, loaderdrv_UpdateDisplayDevices, /* windowing functions */ loaderdrv_CreateDesktop, @@ -1364,7 +1353,6 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version SET_USER_FUNC(UpdateClipboard); SET_USER_FUNC(ChangeDisplaySettings); SET_USER_FUNC(GetCurrentDisplaySettings); - SET_USER_FUNC(GetDisplayDepth); SET_USER_FUNC(UpdateDisplayDevices); SET_USER_FUNC(CreateDesktop); SET_USER_FUNC(CreateWindow); diff --git a/dlls/winemac.drv/display.c b/dlls/winemac.drv/display.c index c160c286d21..54745bf6005 100644 --- a/dlls/winemac.drv/display.c +++ b/dlls/winemac.drv/display.c @@ -953,15 +953,6 @@ BOOL macdrv_GetCurrentDisplaySettings(LPCWSTR devname, BOOL is_primary, LPDEVMOD return TRUE; }
-/*********************************************************************** - * GetDisplayDepth (MACDRV.@) - * - */ -INT macdrv_GetDisplayDepth(LPCWSTR name, BOOL is_primary) -{ - return get_default_bpp(); -} - /*********************************************************************** * GetDeviceGammaRamp (MACDRV.@) */ diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index 8492b0030c0..87b07e51460 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -276,7 +276,6 @@ static const struct user_driver_funcs macdrv_funcs = .pDestroyCursorIcon = macdrv_DestroyCursorIcon, .pDestroyWindow = macdrv_DestroyWindow, .pGetCurrentDisplaySettings = macdrv_GetCurrentDisplaySettings, - .pGetDisplayDepth = macdrv_GetDisplayDepth, .pUpdateDisplayDevices = macdrv_UpdateDisplayDevices, .pGetCursorPos = macdrv_GetCursorPos, .pGetKeyboardLayoutList = macdrv_GetKeyboardLayoutList, diff --git a/dlls/winemac.drv/macdrv.h b/dlls/winemac.drv/macdrv.h index d3c54d72542..74e03d95f4d 100644 --- a/dlls/winemac.drv/macdrv.h +++ b/dlls/winemac.drv/macdrv.h @@ -130,7 +130,6 @@ static inline RECT rect_from_cgrect(CGRect cgrect) extern void macdrv_Beep(void); extern LONG macdrv_ChangeDisplaySettings(LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid); extern BOOL macdrv_GetCurrentDisplaySettings(LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode); -extern INT macdrv_GetDisplayDepth(LPCWSTR name, BOOL is_primary); extern LRESULT macdrv_ClipboardWindowProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp); extern UINT macdrv_UpdateDisplayDevices(const struct gdi_device_manager *device_manager, void *param); extern BOOL macdrv_GetDeviceGammaRamp(PHYSDEV dev, LPVOID ramp); diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index 3ce21d203d2..6560f9efe85 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -36,16 +36,6 @@ static struct x11drv_settings_handler settings_handler;
#define NEXT_DEVMODEW(mode) ((DEVMODEW *)((char *)((mode) + 1) + (mode)->dmDriverExtra))
-struct x11drv_display_depth -{ - struct list entry; - x11drv_settings_id display_id; - DWORD depth; -}; - -/* Display device emulated depth list, protected by modes_section */ -static struct list x11drv_display_depth_list = LIST_INIT(x11drv_display_depth_list); - /* All Windows drivers seen so far either support 32 bit depths, or 24 bit depths, but never both. So if we have * a 32 bit framebuffer, report 32 bit bpps, otherwise 24 bit ones. */ @@ -53,8 +43,6 @@ static const unsigned int depths_24[] = {8, 16, 24}; static const unsigned int depths_32[] = {8, 16, 32}; const unsigned int *depths;
-static pthread_mutex_t settings_mutex = PTHREAD_MUTEX_INITIALIZER; - void X11DRV_Settings_SetHandler(const struct x11drv_settings_handler *new_handler) { if (new_handler->priority > settings_handler.priority) @@ -158,64 +146,6 @@ void X11DRV_Settings_Init(void) X11DRV_Settings_SetHandler(&nores_handler); }
-static void set_display_depth(x11drv_settings_id display_id, DWORD depth) -{ - struct x11drv_display_depth *display_depth; - - pthread_mutex_lock( &settings_mutex ); - LIST_FOR_EACH_ENTRY(display_depth, &x11drv_display_depth_list, struct x11drv_display_depth, entry) - { - if (display_depth->display_id.id == display_id.id) - { - display_depth->depth = depth; - pthread_mutex_unlock( &settings_mutex ); - return; - } - } - - display_depth = malloc(sizeof(*display_depth)); - if (!display_depth) - { - ERR("Failed to allocate memory.\n"); - pthread_mutex_unlock( &settings_mutex ); - return; - } - - display_depth->display_id = display_id; - display_depth->depth = depth; - list_add_head(&x11drv_display_depth_list, &display_depth->entry); - pthread_mutex_unlock( &settings_mutex ); -} - -static DWORD get_display_depth(x11drv_settings_id display_id) -{ - struct x11drv_display_depth *display_depth; - DWORD depth; - - pthread_mutex_lock( &settings_mutex ); - LIST_FOR_EACH_ENTRY(display_depth, &x11drv_display_depth_list, struct x11drv_display_depth, entry) - { - if (display_depth->display_id.id == display_id.id) - { - depth = display_depth->depth; - pthread_mutex_unlock( &settings_mutex ); - return depth; - } - } - pthread_mutex_unlock( &settings_mutex ); - return screen_bpp; -} - -INT X11DRV_GetDisplayDepth(LPCWSTR name, BOOL is_primary) -{ - x11drv_settings_id id; - - if (settings_handler.get_id( name, is_primary, &id )) - return get_display_depth( id ); - - return screen_bpp; -} - /*********************************************************************** * GetCurrentDisplaySettings (X11DRV.@) * @@ -232,7 +162,6 @@ BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPDEVMODEW }
memcpy( &devmode->dmFields, &mode.dmFields, devmode->dmSize - offsetof(DEVMODEW, dmFields) ); - if (!is_detached_mode( devmode )) devmode->dmBitsPerPel = get_display_depth( id ); return TRUE; }
@@ -326,8 +255,6 @@ static LONG apply_display_settings( DEVMODEW *displays, x11drv_settings_id *ids, (int)full_mode->dmBitsPerPel, (int)full_mode->dmDisplayOrientation);
ret = settings_handler.set_current_mode(*id, full_mode); - if (attached_mode && ret == DISP_CHANGE_SUCCESSFUL) - set_display_depth(*id, full_mode->dmBitsPerPel); free_full_mode(full_mode); if (ret != DISP_CHANGE_SUCCESSFUL) return ret; diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index 0bba9727136..b02ed921a7b 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -444,7 +444,6 @@ static const struct user_driver_funcs x11drv_funcs = .pSystrayDockRemove = X11DRV_SystrayDockRemove, .pChangeDisplaySettings = X11DRV_ChangeDisplaySettings, .pGetCurrentDisplaySettings = X11DRV_GetCurrentDisplaySettings, - .pGetDisplayDepth = X11DRV_GetDisplayDepth, .pUpdateDisplayDevices = X11DRV_UpdateDisplayDevices, .pCreateDesktop = X11DRV_CreateDesktop, .pCreateWindow = X11DRV_CreateWindow, diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h index d2eb35b454e..7aecea229d3 100644 --- a/dlls/winex11.drv/x11drv.h +++ b/dlls/winex11.drv/x11drv.h @@ -217,7 +217,6 @@ extern void X11DRV_SystrayDockClear( HWND hwnd ); extern BOOL X11DRV_SystrayDockRemove( HWND hwnd ); extern LONG X11DRV_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_name, HWND hwnd, DWORD flags, LPVOID lpvoid ); extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPDEVMODEW devmode ); -extern INT X11DRV_GetDisplayDepth( LPCWSTR name, BOOL is_primary ); extern UINT X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manager, void *param ); extern BOOL X11DRV_CreateDesktop( const WCHAR *name, UINT width, UINT height ); extern BOOL X11DRV_CreateWindow( HWND hwnd ); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index 6e051cfdaa3..9cdf00a5625 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -219,7 +219,7 @@ struct gdi_dc_funcs };
/* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 97 +#define WINE_GDI_DRIVER_VERSION 98
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */ @@ -360,7 +360,6 @@ struct user_driver_funcs /* display modes */ LONG (*pChangeDisplaySettings)(LPDEVMODEW,LPCWSTR,HWND,DWORD,LPVOID); BOOL (*pGetCurrentDisplaySettings)(LPCWSTR,BOOL,LPDEVMODEW); - INT (*pGetDisplayDepth)(LPCWSTR,BOOL); UINT (*pUpdateDisplayDevices)(const struct gdi_device_manager *,void*); /* windowing functions */ BOOL (*pCreateDesktop)(const WCHAR *,UINT,UINT);