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
23a3552d
Commit
23a3552d
authored
Dec 23, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Dec 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Allocate subobjects at object creation time.
parent
4c68fdbf
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
d3dxof.c
dlls/d3dxof/d3dxof.c
+15
-7
d3dxof_private.h
dlls/d3dxof/d3dxof_private.h
+2
-2
No files found.
dlls/d3dxof/d3dxof.c
View file @
23a3552d
...
...
@@ -2109,9 +2109,9 @@ static BOOL parse_object_parts(parse_buffer * buf, BOOL allow_optional)
TRACE
(
"Found optional reference %s
\n
"
,
(
char
*
)
buf
->
value
);
for
(
i
=
0
;
i
<
buf
->
nb_pxo_globals
;
i
++
)
{
for
(
j
=
0
;
j
<
buf
->
pxo_globals
[
i
*
MAX_SUBOBJECTS
].
nb_subobjects
;
j
++
)
for
(
j
=
0
;
j
<
(
buf
->
pxo_globals
[
i
])[
0
].
nb_subobjects
;
j
++
)
{
if
(
!
strcmp
(
buf
->
pxo_globals
[
i
*
MAX_SUBOBJECTS
+
j
].
name
,
(
char
*
)
buf
->
value
))
if
(
!
strcmp
(
(
buf
->
pxo_globals
[
i
])[
j
].
name
,
(
char
*
)
buf
->
value
))
goto
_exit
;
}
}
...
...
@@ -2122,7 +2122,7 @@ _exit:
return
FALSE
;
}
buf
->
pxo
->
childs
[
buf
->
pxo
->
nb_childs
]
=
&
buf
->
pxo_tab
[
buf
->
cur_subobject
++
];
buf
->
pxo
->
childs
[
buf
->
pxo
->
nb_childs
]
->
ptarget
=
&
buf
->
pxo_globals
[
i
*
MAX_SUBOBJECTS
+
j
];
buf
->
pxo
->
childs
[
buf
->
pxo
->
nb_childs
]
->
ptarget
=
&
(
buf
->
pxo_globals
[
i
])[
j
];
buf
->
pxo
->
nb_childs
++
;
}
else
if
(
check_TOKEN
(
buf
)
==
TOKEN_NAME
)
...
...
@@ -2237,13 +2237,20 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
if
(
FAILED
(
hr
))
return
hr
;
This
->
buf
.
pxo_globals
=
&
This
->
xobjects
[
0
][
0
]
;
This
->
buf
.
pxo_globals
=
This
->
xobjects
;
This
->
buf
.
nb_pxo_globals
=
This
->
nb_xobjects
;
This
->
buf
.
pxo_tab
=
&
This
->
xobjects
[
This
->
nb_xobjects
][
0
];
This
->
buf
.
cur_subobject
=
0
;
This
->
buf
.
pxo
=
&
This
->
buf
.
pxo_tab
[
This
->
buf
.
cur_subobject
++
];
This
->
buf
.
cur_subobject
=
1
;
This
->
buf
.
level
=
0
;
This
->
buf
.
pxo_tab
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
xobject
)
*
MAX_SUBOBJECTS
);
if
(
!
This
->
buf
.
pxo_tab
)
{
ERR
(
"Out of memory
\n
"
);
hr
=
DXFILEERR_BADALLOC
;
goto
error
;
}
This
->
buf
.
pxo
=
This
->
xobjects
[
This
->
nb_xobjects
]
=
This
->
buf
.
pxo_tab
;
pdata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_DATA_SIZE
);
if
(
!
pdata
)
{
...
...
@@ -2291,6 +2298,7 @@ static HRESULT WINAPI IDirectXFileEnumObjectImpl_GetNextDataObject(IDirectXFileE
error:
HeapFree
(
GetProcessHeap
(),
0
,
This
->
buf
.
pxo_tab
);
HeapFree
(
GetProcessHeap
(),
0
,
pdata
);
HeapFree
(
GetProcessHeap
(),
0
,
pstrings
);
...
...
dlls/d3dxof/d3dxof_private.h
View file @
23a3552d
...
...
@@ -130,7 +130,7 @@ typedef struct {
LPBYTE
cur_pdata
;
LPBYTE
cur_pstrings
;
BYTE
value
[
100
];
xobject
*
pxo_globals
;
xobject
*
*
pxo_globals
;
ULONG
nb_pxo_globals
;
xobject
*
pxo_tab
;
IDirectXFileImpl
*
pdxf
;
...
...
@@ -149,7 +149,7 @@ typedef struct {
parse_buffer
buf
;
IDirectXFileImpl
*
pDirectXFile
;
ULONG
nb_xobjects
;
xobject
xobjects
[
MAX_OBJECTS
][
MAX_SUB
OBJECTS
];
xobject
*
xobjects
[
MAX_
OBJECTS
];
}
IDirectXFileEnumObjectImpl
;
typedef
struct
{
...
...
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