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
ed78e4f3
Commit
ed78e4f3
authored
Jun 29, 2004
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Jun 29, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Look up driver info in the registry as well as in system.ini.
Cleanup handling of driver enumeration and fourCC.
parent
6e160f14
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
19 deletions
+42
-19
Makefile.in
dlls/msvideo/Makefile.in
+1
-1
msvideo16.c
dlls/msvideo/msvideo16.c
+41
-18
msvideo_main.c
dlls/msvideo/msvideo_main.c
+0
-0
No files found.
dlls/msvideo/Makefile.in
View file @
ed78e4f3
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
...
@@ -3,7 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
msvfw32.dll
MODULE
=
msvfw32.dll
IMPORTS
=
winmm comctl32 version user32 gdi32 kernel32 ntdll
IMPORTS
=
winmm comctl32 version user32 gdi32
advapi32
kernel32 ntdll
ALTNAMES
=
msvideo.dll
ALTNAMES
=
msvideo.dll
EXTRALIBS
=
$(LIBUNICODE)
EXTRALIBS
=
$(LIBUNICODE)
...
...
dlls/msvideo/msvideo16.c
View file @
ed78e4f3
...
@@ -26,11 +26,14 @@
...
@@ -26,11 +26,14 @@
#include "msvideo_private.h"
#include "msvideo_private.h"
#include "winver.h"
#include "winver.h"
#include "winnls.h"
#include "winnls.h"
#include "winreg.h"
#include "vfw16.h"
#include "vfw16.h"
#include "wine/debug.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
msvideo
);
WINE_DEFAULT_DEBUG_CHANNEL
(
msvideo
);
/* Drivers32 settings */
#define HKLM_DRIVERS32 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Drivers32"
/***********************************************************************
/***********************************************************************
* DrawDibOpen [MSVIDEO.102]
* DrawDibOpen [MSVIDEO.102]
...
@@ -760,35 +763,55 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
...
@@ -760,35 +763,55 @@ DWORD WINAPI VideoCapDriverDescAndVer16(WORD nr, LPSTR buf1, WORD buf1len,
LPSTR
buf2
,
WORD
buf2len
)
LPSTR
buf2
,
WORD
buf2len
)
{
{
DWORD
verhandle
;
DWORD
verhandle
;
WORD
xnr
=
nr
;
DWORD
infosize
;
DWORD
infosize
;
UINT
subblocklen
;
UINT
subblocklen
;
char
*
s
,
buf
[
2000
],
fn
[
260
];
char
*
s
,
buf
[
2048
],
fn
[
260
];
LPBYTE
infobuf
;
LPBYTE
infobuf
;
LPVOID
subblock
;
LPVOID
subblock
;
DWORD
i
,
cnt
=
0
,
lRet
;
DWORD
bufLen
,
fnLen
;
FILETIME
lastWrite
;
HKEY
hKey
;
BOOL
found
=
FALSE
;
TRACE
(
"(%d,%p,%d,%p,%d)
\n
"
,
nr
,
buf1
,
buf1len
,
buf2
,
buf2len
);
TRACE
(
"(%d,%p,%d,%p,%d)
\n
"
,
nr
,
buf1
,
buf1len
,
buf2
,
buf2len
);
if
(
GetPrivateProfileStringA
(
"drivers32"
,
NULL
,
NULL
,
buf
,
sizeof
(
buf
),
"system.ini"
))
lRet
=
RegOpenKeyExA
(
HKEY_LOCAL_MACHINE
,
HKLM_DRIVERS32
,
0
,
KEY_QUERY_VALUE
,
&
hKey
);
if
(
lRet
==
ERROR_SUCCESS
)
{
{
s
=
buf
;
RegQueryInfoKeyA
(
hKey
,
0
,
0
,
0
,
&
cnt
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
while
(
*
s
)
for
(
i
=
0
;
i
<
cnt
;
i
++
)
{
{
if
(
!
strncasecmp
(
s
,
"vid"
,
3
))
bufLen
=
sizeof
(
buf
)
/
sizeof
(
buf
[
0
]);
{
lRet
=
RegEnumKeyExA
(
hKey
,
i
,
buf
,
&
bufLen
,
0
,
0
,
0
,
&
lastWrite
);
if
(
!
xnr
)
break
;
if
(
lRet
!=
ERROR_SUCCESS
)
continue
;
xnr
--
;
if
(
strncasecmp
(
buf
,
"vid"
,
3
))
continue
;
}
if
(
nr
--
)
continue
;
s
=
s
+
strlen
(
s
)
+
1
;
/* either next char or \0 */
fnLen
=
sizeof
(
fn
);
}
lRet
=
RegQueryValueExA
(
hKey
,
buf
,
0
,
0
,
fn
,
&
fnLen
);
if
(
lRet
==
ERROR_SUCCESS
)
found
=
TRUE
;
break
;
}
RegCloseKey
(
hKey
);
}
/* search system.ini if not found in the registry */
if
(
!
found
&&
GetPrivateProfileStringA
(
"drivers32"
,
NULL
,
NULL
,
buf
,
sizeof
(
buf
),
"system.ini"
))
{
for
(
s
=
buf
;
*
s
;
s
+=
strlen
(
s
)
+
1
)
{
if
(
strncasecmp
(
s
,
"vid"
,
3
))
continue
;
if
(
nr
--
)
continue
;
if
(
GetPrivateProfileStringA
(
"drivers32"
,
s
,
NULL
,
fn
,
sizeof
(
fn
),
"system.ini"
))
found
=
TRUE
;
break
;
}
}
}
else
return
20
;
/* hmm, out of entries even if we don't have any */
if
(
nr
||
!
found
)
if
(
xnr
)
{
{
FIXME
(
"No more VID* entries found
\n
"
);
TRACE
(
"No more VID* entries found nr=%d
\n
"
,
nr
);
return
20
;
return
20
;
}
}
GetPrivateProfileStringA
(
"drivers32"
,
s
,
NULL
,
fn
,
sizeof
(
fn
),
"system.ini"
);
infosize
=
GetFileVersionInfoSizeA
(
fn
,
&
verhandle
);
infosize
=
GetFileVersionInfoSizeA
(
fn
,
&
verhandle
);
if
(
!
infosize
)
if
(
!
infosize
)
{
{
...
...
dlls/msvideo/msvideo_main.c
View file @
ed78e4f3
This diff is collapsed.
Click to expand it.
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