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
7c3bb607
Commit
7c3bb607
authored
Dec 30, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't bother returning the driver module from DRIVER_load_driver.
parent
754e6216
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
dc.c
dlls/gdi32/dc.c
+1
-2
driver.c
dlls/gdi32/driver.c
+5
-12
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-1
No files found.
dlls/gdi32/dc.c
View file @
7c3bb607
...
@@ -625,7 +625,6 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
...
@@ -625,7 +625,6 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
HDC
hdc
;
HDC
hdc
;
DC
*
dc
;
DC
*
dc
;
const
struct
gdi_dc_funcs
*
funcs
;
const
struct
gdi_dc_funcs
*
funcs
;
HMODULE
module
;
WCHAR
buf
[
300
];
WCHAR
buf
[
300
];
GDI_CheckNotLock
();
GDI_CheckNotLock
();
...
@@ -640,7 +639,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
...
@@ -640,7 +639,7 @@ HDC WINAPI CreateDCW( LPCWSTR driver, LPCWSTR device, LPCWSTR output,
strcpyW
(
buf
,
driver
);
strcpyW
(
buf
,
driver
);
}
}
if
(
!
(
funcs
=
DRIVER_load_driver
(
buf
,
&
module
)))
if
(
!
(
funcs
=
DRIVER_load_driver
(
buf
)))
{
{
ERR
(
"no driver found for %s
\n
"
,
debugstr_w
(
buf
)
);
ERR
(
"no driver found for %s
\n
"
,
debugstr_w
(
buf
)
);
return
0
;
return
0
;
...
...
dlls/gdi32/driver.c
View file @
7c3bb607
...
@@ -91,7 +91,7 @@ static struct graphics_driver *create_driver( HMODULE module )
...
@@ -91,7 +91,7 @@ static struct graphics_driver *create_driver( HMODULE module )
*
*
* Special case for loading the display driver: get the name from the config file
* Special case for loading the display driver: get the name from the config file
*/
*/
static
const
struct
gdi_dc_funcs
*
get_display_driver
(
HMODULE
*
module_ret
)
static
const
struct
gdi_dc_funcs
*
get_display_driver
(
void
)
{
{
if
(
!
display_driver
)
if
(
!
display_driver
)
{
{
...
@@ -104,8 +104,6 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret )
...
@@ -104,8 +104,6 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret )
__wine_set_display_driver
(
0
);
__wine_set_display_driver
(
0
);
}
}
}
}
*
module_ret
=
display_driver
->
module
;
return
display_driver
->
funcs
;
return
display_driver
->
funcs
;
}
}
...
@@ -113,7 +111,7 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret )
...
@@ -113,7 +111,7 @@ static const struct gdi_dc_funcs *get_display_driver( HMODULE *module_ret )
/**********************************************************************
/**********************************************************************
* DRIVER_load_driver
* DRIVER_load_driver
*/
*/
const
struct
gdi_dc_funcs
*
DRIVER_load_driver
(
LPCWSTR
name
,
HMODULE
*
module_ret
)
const
struct
gdi_dc_funcs
*
DRIVER_load_driver
(
LPCWSTR
name
)
{
{
HMODULE
module
;
HMODULE
module
;
struct
graphics_driver
*
driver
,
*
new_driver
;
struct
graphics_driver
*
driver
,
*
new_driver
;
...
@@ -121,16 +119,12 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name, HMODULE *module_ret
...
@@ -121,16 +119,12 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name, HMODULE *module_ret
static
const
WCHAR
display1W
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
'1'
,
0
};
static
const
WCHAR
display1W
[]
=
{
'\\'
,
'\\'
,
'.'
,
'\\'
,
'D'
,
'I'
,
'S'
,
'P'
,
'L'
,
'A'
,
'Y'
,
'1'
,
0
};
/* display driver is a special case */
/* display driver is a special case */
if
(
!
strcmpiW
(
name
,
displayW
)
||
!
strcmpiW
(
name
,
display1W
))
if
(
!
strcmpiW
(
name
,
displayW
)
||
!
strcmpiW
(
name
,
display1W
))
return
get_display_driver
();
return
get_display_driver
(
module_ret
);
if
((
module
=
GetModuleHandleW
(
name
)))
if
((
module
=
GetModuleHandleW
(
name
)))
{
{
if
(
display_driver
&&
display_driver
->
module
==
module
)
if
(
display_driver
&&
display_driver
->
module
==
module
)
return
display_driver
->
funcs
;
{
*
module_ret
=
module
;
return
display_driver
->
funcs
;
}
EnterCriticalSection
(
&
driver_section
);
EnterCriticalSection
(
&
driver_section
);
LIST_FOR_EACH_ENTRY
(
driver
,
&
drivers
,
struct
graphics_driver
,
entry
)
LIST_FOR_EACH_ENTRY
(
driver
,
&
drivers
,
struct
graphics_driver
,
entry
)
{
{
...
@@ -160,7 +154,6 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name, HMODULE *module_ret
...
@@ -160,7 +154,6 @@ const struct gdi_dc_funcs *DRIVER_load_driver( LPCWSTR name, HMODULE *module_ret
list_add_head
(
&
drivers
,
&
driver
->
entry
);
list_add_head
(
&
drivers
,
&
driver
->
entry
);
TRACE
(
"loaded driver %p for %s
\n
"
,
driver
,
debugstr_w
(
name
)
);
TRACE
(
"loaded driver %p for %s
\n
"
,
driver
,
debugstr_w
(
name
)
);
done:
done:
*
module_ret
=
driver
->
module
;
LeaveCriticalSection
(
&
driver_section
);
LeaveCriticalSection
(
&
driver_section
);
return
driver
->
funcs
;
return
driver
->
funcs
;
}
}
...
...
dlls/gdi32/gdi_private.h
View file @
7c3bb607
...
@@ -268,7 +268,7 @@ extern const struct gdi_dc_funcs null_driver DECLSPEC_HIDDEN;
...
@@ -268,7 +268,7 @@ extern const struct gdi_dc_funcs null_driver DECLSPEC_HIDDEN;
extern
const
struct
gdi_dc_funcs
dib_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
dib_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
path_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
path_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
*
font_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
*
font_driver
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
*
DRIVER_load_driver
(
LPCWSTR
name
,
HMODULE
*
module
)
DECLSPEC_HIDDEN
;
extern
const
struct
gdi_dc_funcs
*
DRIVER_load_driver
(
LPCWSTR
name
)
DECLSPEC_HIDDEN
;
extern
BOOL
DRIVER_GetDriverName
(
LPCWSTR
device
,
LPWSTR
driver
,
DWORD
size
)
DECLSPEC_HIDDEN
;
extern
BOOL
DRIVER_GetDriverName
(
LPCWSTR
device
,
LPWSTR
driver
,
DWORD
size
)
DECLSPEC_HIDDEN
;
/* enhmetafile.c */
/* enhmetafile.c */
...
...
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