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
e27bc886
Commit
e27bc886
authored
May 06, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Add a global function to retrieve the display driver.
parent
8dc9e878
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
dc.c
dlls/gdi32/dc.c
+1
-1
driver.c
dlls/gdi32/driver.c
+6
-9
gdi_private.h
dlls/gdi32/gdi_private.h
+1
-0
No files found.
dlls/gdi32/dc.c
View file @
e27bc886
...
@@ -760,7 +760,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
...
@@ -760,7 +760,7 @@ HDC WINAPI CreateCompatibleDC( HDC hdc )
release_dc_ptr
(
origDC
);
release_dc_ptr
(
origDC
);
}
}
if
(
!
funcs
&&
!
(
funcs
=
DRIVER_
load_driver
(
displayW
)))
return
0
;
if
(
!
funcs
&&
!
(
funcs
=
DRIVER_
get_display_driver
(
)))
return
0
;
if
(
!
(
dc
=
alloc_dc_ptr
(
funcs
,
OBJ_MEMDC
)))
goto
error
;
if
(
!
(
dc
=
alloc_dc_ptr
(
funcs
,
OBJ_MEMDC
)))
goto
error
;
...
...
dlls/gdi32/driver.c
View file @
e27bc886
...
@@ -214,18 +214,18 @@ static struct graphics_driver *create_driver( HMODULE module )
...
@@ -214,18 +214,18 @@ static struct graphics_driver *create_driver( HMODULE module )
/**********************************************************************
/**********************************************************************
*
load
_display_driver
*
DRIVER_get
_display_driver
*
*
* 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
struct
graphics_driver
*
load
_display_driver
(
void
)
const
DC_FUNCTIONS
*
DRIVER_get
_display_driver
(
void
)
{
{
struct
graphics_driver
*
driver
;
struct
graphics_driver
*
driver
;
char
buffer
[
MAX_PATH
],
libname
[
32
],
*
name
,
*
next
;
char
buffer
[
MAX_PATH
],
libname
[
32
],
*
name
,
*
next
;
HMODULE
module
=
0
;
HMODULE
module
=
0
;
HKEY
hkey
;
HKEY
hkey
;
if
(
display_driver
)
return
display_driver
;
/* already loaded */
if
(
display_driver
)
return
&
display_driver
->
funcs
;
/* already loaded */
strcpy
(
buffer
,
"x11"
);
/* default value */
strcpy
(
buffer
,
"x11"
);
/* default value */
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
...
@@ -259,7 +259,7 @@ static struct graphics_driver *load_display_driver(void)
...
@@ -259,7 +259,7 @@ static struct graphics_driver *load_display_driver(void)
FreeLibrary
(
driver
->
module
);
FreeLibrary
(
driver
->
module
);
HeapFree
(
GetProcessHeap
(),
0
,
driver
);
HeapFree
(
GetProcessHeap
(),
0
,
driver
);
}
}
return
display_driver
;
return
&
display_driver
->
funcs
;
}
}
...
@@ -274,11 +274,8 @@ const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name )
...
@@ -274,11 +274,8 @@ const DC_FUNCTIONS *DRIVER_load_driver( LPCWSTR name )
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
DRIVER_get_display_driver
();
{
driver
=
load_display_driver
();
return
&
driver
->
funcs
;
}
if
((
module
=
GetModuleHandleW
(
name
)))
if
((
module
=
GetModuleHandleW
(
name
)))
{
{
if
(
display_driver
&&
display_driver
->
module
==
module
)
return
&
display_driver
->
funcs
;
if
(
display_driver
&&
display_driver
->
module
==
module
)
return
&
display_driver
->
funcs
;
...
...
dlls/gdi32/gdi_private.h
View file @
e27bc886
...
@@ -385,6 +385,7 @@ extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
...
@@ -385,6 +385,7 @@ extern int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, LONG *width,
LONG
*
height
,
WORD
*
planes
,
WORD
*
bpp
,
DWORD
*
compr
,
DWORD
*
size
)
DECLSPEC_HIDDEN
;
LONG
*
height
,
WORD
*
planes
,
WORD
*
bpp
,
DWORD
*
compr
,
DWORD
*
size
)
DECLSPEC_HIDDEN
;
/* driver.c */
/* driver.c */
extern
const
DC_FUNCTIONS
*
DRIVER_get_display_driver
(
void
)
DECLSPEC_HIDDEN
;
extern
const
DC_FUNCTIONS
*
DRIVER_load_driver
(
LPCWSTR
name
)
DECLSPEC_HIDDEN
;
extern
const
DC_FUNCTIONS
*
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
;
...
...
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