Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1bd5bfeb
Commit
1bd5bfeb
authored
Apr 29, 2013
by
Christian Costa
Committed by
Alexandre Julliard
Apr 30, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Only parse templates for object files, but with RegisterTemplates parse the whole file.
parent
37d03774
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
11 additions
and
8 deletions
+11
-8
xfile.c
dlls/d3dx9_36/tests/xfile.c
+1
-1
d3dxof.c
dlls/d3dxof/d3dxof.c
+4
-3
d3dxof_private.h
dlls/d3dxof/d3dxof_private.h
+1
-1
parsing.c
dlls/d3dxof/parsing.c
+4
-2
d3dxof.c
dlls/d3dxof/tests/d3dxof.c
+1
-1
No files found.
dlls/d3dx9_36/tests/xfile.c
View file @
1bd5bfeb
...
...
@@ -77,7 +77,7 @@ static void test_templates(void)
ok
(
ret
==
D3DXFERR_BADFILEFLOATSIZE
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
D3DXFERR_BADFILEFLOATSIZE
);
ret
=
d3dxfile
->
lpVtbl
->
RegisterTemplates
(
d3dxfile
,
templates_parse_error
,
sizeof
(
templates_parse_error
)
-
1
);
todo_wine
ok
(
ret
==
D3DXFERR_PARSEERROR
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
D3DXFERR_PARSEERROR
);
ok
(
ret
==
D3DXFERR_PARSEERROR
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
D3DXFERR_PARSEERROR
);
ret
=
d3dxfile
->
lpVtbl
->
RegisterTemplates
(
d3dxfile
,
templates
,
sizeof
(
templates
)
-
1
);
ok
(
ret
==
S_OK
,
"RegisterTemplates failed with %#x
\n
"
,
ret
);
...
...
dlls/d3dxof/d3dxof.c
View file @
1bd5bfeb
...
...
@@ -241,7 +241,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
if
(
FAILED
(
hr
))
goto
error
;
if
(
!
parse_templates
(
&
object
->
buf
))
/* Check if there are templates defined before the object */
if
(
!
parse_templates
(
&
object
->
buf
,
TRUE
))
{
hr
=
DXFILEERR_PARSEERROR
;
goto
error
;
...
...
@@ -320,7 +321,7 @@ static HRESULT WINAPI IDirectXFileImpl_RegisterTemplates(IDirectXFile* iface, LP
if
(
FAILED
(
hr
))
goto
cleanup
;
if
(
!
parse_templates
(
&
buf
))
if
(
!
parse_templates
(
&
buf
,
FALSE
))
{
hr
=
DXFILEERR_PARSEERROR
;
goto
cleanup
;
...
...
@@ -1003,7 +1004,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
}
/* Check if there are templates defined before the object */
if
(
!
parse_templates
(
&
This
->
buf
))
if
(
!
parse_templates
(
&
This
->
buf
,
TRUE
))
return
DXFILEERR_PARSEERROR
;
if
(
!
This
->
buf
.
rem_bytes
)
...
...
dlls/d3dxof/d3dxof_private.h
View file @
1bd5bfeb
...
...
@@ -161,7 +161,7 @@ HRESULT IDirectXFileImpl_Create(IUnknown *pUnkOuter, LPVOID *ppObj) DECLSPEC_HID
HRESULT
parse_header
(
parse_buffer
*
buf
,
BYTE
**
decomp_buffer_ptr
)
DECLSPEC_HIDDEN
;
BOOL
parse_object
(
parse_buffer
*
buf
)
DECLSPEC_HIDDEN
;
BOOL
parse_templates
(
parse_buffer
*
buf
)
DECLSPEC_HIDDEN
;
BOOL
parse_templates
(
parse_buffer
*
buf
,
BOOL
templates_only
)
DECLSPEC_HIDDEN
;
int
mszip_decompress
(
int
inlen
,
int
outlen
,
char
*
inbuffer
,
char
*
outbuffer
)
DECLSPEC_HIDDEN
;
...
...
dlls/d3dxof/parsing.c
View file @
1bd5bfeb
...
...
@@ -1121,10 +1121,12 @@ static BOOL parse_template(parse_buffer * buf)
return
TRUE
;
}
BOOL
parse_templates
(
parse_buffer
*
buf
)
BOOL
parse_templates
(
parse_buffer
*
buf
,
BOOL
templates_only
)
{
while
(
check_TOKEN
(
buf
)
==
TOKEN_TEMPLAT
E
)
while
(
check_TOKEN
(
buf
)
!=
TOKEN_NON
E
)
{
if
(
templates_only
&&
(
check_TOKEN
(
buf
)
!=
TOKEN_TEMPLATE
))
return
TRUE
;
if
(
!
parse_template
(
buf
))
{
WARN
(
"Template is not correct
\n
"
);
...
...
dlls/d3dxof/tests/d3dxof.c
View file @
1bd5bfeb
...
...
@@ -427,7 +427,7 @@ static void test_templates(void)
ok
(
ret
==
DXFILEERR_BADFILEFLOATSIZE
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_BADFILEFLOATSIZE
);
ret
=
IDirectXFile_RegisterTemplates
(
dxfile
,
templates_parse_error
,
sizeof
(
templates_parse_error
)
-
1
);
todo_wine
ok
(
ret
==
DXFILEERR_PARSEERROR
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_PARSEERROR
);
ok
(
ret
==
DXFILEERR_PARSEERROR
,
"RegisterTemplates returned %#x, expected %#x
\n
"
,
ret
,
DXFILEERR_PARSEERROR
);
IDirectXFile_Release
(
dxfile
);
}
...
...
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