gdi32: Allow user32 to specify the display driver to use.
This commit is contained in:
parent
010769249c
commit
9675aa173a
|
@ -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 )
|
||||
{
|
||||
return 0;
|
||||
|
|
|
@ -515,6 +515,7 @@
|
|||
|
||||
# Graphics drivers
|
||||
@ cdecl __wine_get_driver_module(long)
|
||||
@ cdecl __wine_set_display_driver(long)
|
||||
|
||||
# OpenGL
|
||||
@ cdecl __wine_get_wgl_driver(long long)
|
||||
|
|
|
@ -158,6 +158,7 @@ static const USER_DRIVER *load_driver(void)
|
|||
}
|
||||
else LdrAddRefDll( 0, graphics_driver );
|
||||
|
||||
__wine_set_display_driver( graphics_driver );
|
||||
register_builtin_classes();
|
||||
|
||||
return driver;
|
||||
|
|
|
@ -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,
|
||||
const RECT *device_rect, struct window_surface *surface );
|
||||
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 );
|
||||
|
||||
#endif /* __WINE_WINE_GDI_DRIVER_H */
|
||||
|
|
Loading…
Reference in New Issue