Commit 9675aa17 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Allow user32 to specify the display driver to use.

parent 01076924
...@@ -223,6 +223,23 @@ HMODULE CDECL __wine_get_driver_module( HDC hdc ) ...@@ -223,6 +223,23 @@ HMODULE CDECL __wine_get_driver_module( HDC hdc )
} }
/***********************************************************************
* __wine_set_display_driver_module (GDI32.@)
*/
void CDECL __wine_set_display_driver( HMODULE module )
{
struct graphics_driver *driver;
if (!(driver = create_driver( module )))
{
ERR( "Could not create graphics driver\n" );
ExitProcess(1);
}
if (InterlockedCompareExchangePointer( (void **)&display_driver, driver, NULL ))
HeapFree( GetProcessHeap(), 0, driver );
}
static INT nulldrv_AbortDoc( PHYSDEV dev ) static INT nulldrv_AbortDoc( PHYSDEV dev )
{ {
return 0; return 0;
......
...@@ -515,6 +515,7 @@ ...@@ -515,6 +515,7 @@
# Graphics drivers # Graphics drivers
@ cdecl __wine_get_driver_module(long) @ cdecl __wine_get_driver_module(long)
@ cdecl __wine_set_display_driver(long)
# OpenGL # OpenGL
@ cdecl __wine_get_wgl_driver(long long) @ cdecl __wine_get_wgl_driver(long long)
...@@ -158,6 +158,7 @@ static const USER_DRIVER *load_driver(void) ...@@ -158,6 +158,7 @@ static const USER_DRIVER *load_driver(void)
} }
else LdrAddRefDll( 0, graphics_driver ); else LdrAddRefDll( 0, graphics_driver );
__wine_set_display_driver( graphics_driver );
register_builtin_classes(); register_builtin_classes();
return driver; return driver;
......
...@@ -277,6 +277,7 @@ extern void CDECL __wine_make_gdi_object_system( HGDIOBJ handle, BOOL set ); ...@@ -277,6 +277,7 @@ extern void CDECL __wine_make_gdi_object_system( HGDIOBJ handle, BOOL set );
extern void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect, extern void CDECL __wine_set_visible_region( HDC hdc, HRGN hrgn, const RECT *vis_rect,
const RECT *device_rect, struct window_surface *surface ); const RECT *device_rect, struct window_surface *surface );
extern HMODULE CDECL __wine_get_driver_module( HDC hdc ); extern HMODULE CDECL __wine_get_driver_module( HDC hdc );
extern void CDECL __wine_set_display_driver( HMODULE module );
extern struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version ); extern struct opengl_funcs * CDECL __wine_get_wgl_driver( HDC hdc, UINT version );
#endif /* __WINE_WINE_GDI_DRIVER_H */ #endif /* __WINE_WINE_GDI_DRIVER_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment