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
b2361425
Commit
b2361425
authored
Oct 30, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Allow to specify the name of the graphics driver in the /desktop option.
parent
4473ce4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
12 deletions
+20
-12
desktop.c
programs/explorer/desktop.c
+20
-12
No files found.
programs/explorer/desktop.c
View file @
b2361425
...
...
@@ -638,7 +638,7 @@ static BOOL get_default_desktop_size( const WCHAR *name, unsigned int *width, un
return
found
;
}
static
HMODULE
load_graphics_driver
(
const
GUID
*
guid
)
static
HMODULE
load_graphics_driver
(
const
WCHAR
*
driver
,
const
GUID
*
guid
)
{
static
const
WCHAR
device_keyW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
...
...
@@ -660,15 +660,19 @@ static HMODULE load_graphics_driver( const GUID *guid )
HKEY
hkey
;
char
error
[
80
];
strcpyW
(
buffer
,
default_driver
);
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
driversW
,
&
hkey
))
if
(
!
driver
)
{
DWORD
count
=
sizeof
(
buffer
);
RegQueryValueExW
(
hkey
,
graphicsW
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
count
);
RegCloseKey
(
hkey
);
strcpyW
(
buffer
,
default_driver
);
/* @@ Wine registry key: HKCU\Software\Wine\Drivers */
if
(
!
RegOpenKeyW
(
HKEY_CURRENT_USER
,
driversW
,
&
hkey
))
{
DWORD
count
=
sizeof
(
buffer
);
RegQueryValueExW
(
hkey
,
graphicsW
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
count
);
RegCloseKey
(
hkey
);
}
}
else
lstrcpynW
(
buffer
,
driver
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
);
name
=
buffer
;
while
(
name
)
...
...
@@ -773,7 +777,7 @@ void manage_desktop( WCHAR *arg )
HWND
hwnd
,
msg_hwnd
;
HMODULE
graphics_driver
;
unsigned
int
width
,
height
;
WCHAR
*
cmdline
=
NULL
;
WCHAR
*
cmdline
=
NULL
,
*
driver
=
NULL
;
WCHAR
*
p
=
arg
;
const
WCHAR
*
name
=
NULL
;
...
...
@@ -787,12 +791,16 @@ void manage_desktop( WCHAR *arg )
}
/* parse the desktop option */
/* the option is of the form /desktop=name[,widthxheight] */
/* the option is of the form /desktop=name[,widthxheight
[,driver]
] */
if
(
*
arg
==
'='
||
*
arg
==
','
)
{
arg
++
;
name
=
arg
;
if
((
p
=
strchrW
(
arg
,
','
)))
*
p
++
=
0
;
if
((
p
=
strchrW
(
arg
,
','
)))
{
*
p
++
=
0
;
if
((
driver
=
strchrW
(
p
,
','
)))
*
driver
++
=
0
;
}
if
(
!
p
||
!
parse_size
(
p
,
&
width
,
&
height
))
get_default_desktop_size
(
name
,
&
width
,
&
height
);
}
...
...
@@ -813,7 +821,7 @@ void manage_desktop( WCHAR *arg )
UuidCreate
(
&
guid
);
TRACE
(
"display guid %s
\n
"
,
debugstr_guid
(
&
guid
)
);
graphics_driver
=
load_graphics_driver
(
&
guid
);
graphics_driver
=
load_graphics_driver
(
driver
,
&
guid
);
/* create the desktop window */
hwnd
=
CreateWindowExW
(
0
,
DESKTOP_CLASS_ATOM
,
NULL
,
...
...
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