Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
74efeab2
Commit
74efeab2
authored
Oct 29, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Trigger creation of the desktop window when the display driver is needed.
parent
9675aa17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
61 deletions
+8
-61
driver.c
dlls/gdi32/driver.c
+8
-59
gdi32.spec
dlls/gdi32/gdi32.spec
+0
-1
gdi_driver.h
include/wine/gdi_driver.h
+0
-1
No files found.
dlls/gdi32/driver.c
View file @
74efeab2
...
...
@@ -28,7 +28,6 @@
#include <stdio.h>
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "ddrawgdi.h"
#include "wine/winbase16.h"
...
...
@@ -48,7 +47,6 @@ struct graphics_driver
static
struct
list
drivers
=
LIST_INIT
(
drivers
);
static
struct
graphics_driver
*
display_driver
;
static
DWORD
display_driver_load_error
;
const
struct
gdi_dc_funcs
*
font_driver
=
NULL
;
...
...
@@ -101,48 +99,18 @@ static struct graphics_driver *create_driver( HMODULE module )
*/
static
const
struct
gdi_dc_funcs
*
get_display_driver
(
HMODULE
*
module_ret
)
{
struct
graphics_driver
*
driver
;
char
buffer
[
MAX_PATH
],
libname
[
32
],
*
name
,
*
next
;
HMODULE
module
=
0
;
HKEY
hkey
;
if
(
display_driver
)
goto
done
;
strcpy
(
buffer
,
default_driver
);
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Drivers"
,
&
hkey
))
{
DWORD
type
,
count
=
sizeof
(
buffer
);
RegQueryValueExA
(
hkey
,
"Graphics"
,
0
,
&
type
,
(
LPBYTE
)
buffer
,
&
count
);
RegCloseKey
(
hkey
);
}
name
=
buffer
;
while
(
name
)
if
(
!
display_driver
)
{
next
=
strchr
(
name
,
','
);
if
(
next
)
*
next
++
=
0
;
HMODULE
user32
=
LoadLibraryA
(
"user32.dll"
);
HWND
(
WINAPI
*
pGetDesktopWindow
)(
void
)
=
(
void
*
)
GetProcAddress
(
user32
,
"GetDesktopWindow"
)
;
snprintf
(
libname
,
sizeof
(
libname
),
"wine%s.drv"
,
name
);
if
((
module
=
LoadLibraryA
(
libname
))
!=
0
)
break
;
name
=
next
;
if
(
!
pGetDesktopWindow
()
||
!
display_driver
)
{
WARN
(
"failed to load the display driver, falling back to null driver
\n
"
);
__wine_set_display_driver
(
0
);
}
}
if
(
!
module
)
display_driver_load_error
=
GetLastError
();
if
(
!
(
driver
=
create_driver
(
module
)))
{
MESSAGE
(
"Could not create graphics driver '%s'
\n
"
,
buffer
);
FreeLibrary
(
module
);
ExitProcess
(
1
);
}
if
(
InterlockedCompareExchangePointer
(
(
void
**
)
&
display_driver
,
driver
,
NULL
))
{
/* somebody beat us to it */
FreeLibrary
(
driver
->
module
);
HeapFree
(
GetProcessHeap
(),
0
,
driver
);
}
done:
*
module_ret
=
display_driver
->
module
;
return
display_driver
->
funcs
;
}
...
...
@@ -205,25 +173,6 @@ done:
/***********************************************************************
* __wine_get_driver_module (GDI32.@)
*/
HMODULE
CDECL
__wine_get_driver_module
(
HDC
hdc
)
{
DC
*
dc
;
HMODULE
ret
=
0
;
if
((
dc
=
get_dc_ptr
(
hdc
)))
{
ret
=
dc
->
module
;
release_dc_ptr
(
dc
);
if
(
!
ret
)
SetLastError
(
display_driver_load_error
);
}
else
SetLastError
(
ERROR_INVALID_HANDLE
);
return
ret
;
}
/***********************************************************************
* __wine_set_display_driver_module (GDI32.@)
*/
void
CDECL
__wine_set_display_driver
(
HMODULE
module
)
...
...
dlls/gdi32/gdi32.spec
View file @
74efeab2
...
...
@@ -514,7 +514,6 @@
@ cdecl __wine_set_visible_region(long long ptr ptr ptr)
# Graphics drivers
@ cdecl __wine_get_driver_module(long)
@ cdecl __wine_set_display_driver(long)
# OpenGL
...
...
include/wine/gdi_driver.h
View file @
74efeab2
...
...
@@ -276,7 +276,6 @@ WINGDIAPI WORD WINAPI SetHookFlags(HDC,WORD);
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment