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
641200dc
Commit
641200dc
authored
Nov 11, 2008
by
Christian Costa
Committed by
Alexandre Julliard
Nov 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dxof: Add support for DXFILELOAD_FROMMEMORY.
parent
3b30fd9d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
d3dxof.c
dlls/d3dxof/d3dxof.c
+25
-7
No files found.
dlls/d3dxof/d3dxof.c
View file @
641200dc
...
...
@@ -205,6 +205,7 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
DWORD
header
[
4
];
DWORD
size
;
HANDLE
hFile
=
INVALID_HANDLE_VALUE
;
LPDXFILELOADMEMORY
lpdxflm
=
NULL
;
TRACE
(
"(%p/%p)->(%p,%x,%p)
\n
"
,
This
,
iface
,
pvSource
,
dwLoadOptions
,
ppEnumObj
);
...
...
@@ -233,14 +234,14 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
hr
=
DXFILEERR_BADFILETYPE
;
goto
error
;
}
if
(
TRACE_ON
(
d3dxof
))
{
char
string
[
17
];
memcpy
(
string
,
header
,
16
);
string
[
16
]
=
0
;
TRACE
(
"header = '%s'
\n
"
,
string
);
}
else
if
(
dwLoadOptions
==
DXFILELOAD_FROMMEMORY
)
{
lpdxflm
=
(
LPDXFILELOADMEMORY
)
pvSource
;
FIXME
(
"Source in memory at %p with size %d
\n
"
,
lpdxflm
->
lpMemory
,
lpdxflm
->
dSize
);
memcpy
(
header
,
(
char
*
)
lpdxflm
->
lpMemory
,
16
);
}
else
{
...
...
@@ -249,6 +250,14 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
goto
error
;
}
if
(
TRACE_ON
(
d3dxof
))
{
char
string
[
17
];
memcpy
(
string
,
header
,
16
);
string
[
16
]
=
0
;
TRACE
(
"header = '%s'
\n
"
,
string
);
}
if
(
header
[
0
]
!=
XOFFILE_FORMAT_MAGIC
)
{
hr
=
DXFILEERR_BADFILETYPE
;
...
...
@@ -301,6 +310,8 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
object
->
buf
.
token_present
=
FALSE
;
object
->
buf
.
cur_subobject
=
0
;
if
(
dwLoadOptions
==
DXFILELOAD_FROMFILE
)
{
object
->
buf
.
buffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_INPUT_SIZE
+
1
);
if
(
!
object
->
buf
.
buffer
)
{
...
...
@@ -317,6 +328,13 @@ static HRESULT WINAPI IDirectXFileImpl_CreateEnumObject(IDirectXFile* iface, LPV
hr
=
DXFILEERR_PARSEERROR
;
goto
error
;
}
}
else
{
object
->
buf
.
buffer
=
((
LPBYTE
)
lpdxflm
->
lpMemory
)
+
16
;
object
->
buf
.
rem_bytes
=
lpdxflm
->
dSize
;
}
TRACE
(
"Read %d bytes
\n
"
,
object
->
buf
.
rem_bytes
);
*
ppEnumObj
=
(
LPDIRECTXFILEENUMOBJECT
)
object
;
...
...
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