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
4b5f326e
Commit
4b5f326e
authored
Oct 31, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default to an empty driver instead of dying if the specified display
driver couldn't be loaded.
parent
7a48f838
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
dc.c
dlls/gdi/dc.c
+14
-0
driver.c
dlls/gdi/driver.c
+5
-10
No files found.
dlls/gdi/dc.c
View file @
4b5f326e
...
...
@@ -889,6 +889,20 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
if
((
dc
=
DC_GetDCPtr
(
hdc
)))
{
if
(
dc
->
funcs
->
pGetDeviceCaps
)
ret
=
dc
->
funcs
->
pGetDeviceCaps
(
dc
->
physDev
,
cap
);
else
switch
(
cap
)
/* return meaningful values for some entries */
{
case
HORZRES
:
ret
=
640
;
break
;
case
VERTRES
:
ret
=
480
;
break
;
case
BITSPIXEL
:
ret
=
1
;
break
;
case
PLANES
:
ret
=
1
;
break
;
case
NUMCOLORS
:
ret
=
2
;
break
;
case
ASPECTX
:
ret
=
36
;
break
;
case
ASPECTY
:
ret
=
36
;
break
;
case
ASPECTXY
:
ret
=
51
;
break
;
case
LOGPIXELSX
:
ret
=
72
;
break
;
case
LOGPIXELSY
:
ret
=
72
;
break
;
case
SIZEPALETTE
:
ret
=
2
;
break
;
}
GDI_ReleaseObj
(
hdc
);
}
return
ret
;
...
...
dlls/gdi/driver.c
View file @
4b5f326e
...
...
@@ -73,9 +73,9 @@ static struct graphics_driver *create_driver( HMODULE module )
driver
->
count
=
1
;
/* fill the function table */
if
(
module
)
{
#define GET_FUNC(name) driver->funcs.p##name = (void*)GetProcAddress( module, #name )
GET_FUNC
(
AbortDoc
);
GET_FUNC
(
AbortPath
);
GET_FUNC
(
AlphaBlend
);
...
...
@@ -195,6 +195,8 @@ static struct graphics_driver *create_driver( HMODULE module )
GET_FUNC
(
SwapBuffers
);
GET_FUNC
(
WidenPath
);
#undef GET_FUNC
}
else
memset
(
&
driver
->
funcs
,
0
,
sizeof
(
driver
->
funcs
)
);
/* add it to the list */
driver
->
prev
=
NULL
;
...
...
@@ -221,7 +223,7 @@ static struct graphics_driver *load_display_driver(void)
return
display_driver
;
}
strcpy
(
buffer
,
"x11
,tty
"
);
/* default value */
strcpy
(
buffer
,
"x11"
);
/* default value */
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
Drivers"
,
&
hkey
))
{
...
...
@@ -240,13 +242,6 @@ static struct graphics_driver *load_display_driver(void)
if
((
module
=
LoadLibraryA
(
libname
))
!=
0
)
break
;
name
=
next
;
}
if
(
!
module
)
{
MESSAGE
(
"wine: Could not load graphics driver '%s'.
\n
"
,
buffer
);
if
(
!
strcasecmp
(
buffer
,
"x11"
))
MESSAGE
(
"Make sure that your X server is running and that $DISPLAY is set correctly.
\n
"
);
ExitProcess
(
1
);
}
if
(
!
(
display_driver
=
create_driver
(
module
)))
{
...
...
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