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
dfc5ab14
Commit
dfc5ab14
authored
May 29, 2012
by
Józef Kucia
Committed by
Alexandre Julliard
May 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Forward D3DXSaveTextureToFile to D3DXSaveTextureToFileInMemory.
parent
70b1bff6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
69 additions
and
3 deletions
+69
-3
d3dx9_36.spec
dlls/d3dx9_36/d3dx9_36.spec
+3
-3
texture.c
dlls/d3dx9_36/texture.c
+61
-0
d3dx9tex.h
include/d3dx9tex.h
+5
-0
No files found.
dlls/d3dx9_36/d3dx9_36.spec
View file @
dfc5ab14
...
...
@@ -266,9 +266,9 @@
@ stdcall D3DXSaveSurfaceToFileA(ptr long ptr ptr ptr)
@ stdcall D3DXSaveSurfaceToFileInMemory(ptr long ptr ptr ptr)
@ stdcall D3DXSaveSurfaceToFileW(ptr long ptr ptr ptr)
@ st
ub
D3DXSaveTextureToFileA(ptr long ptr ptr)
@ st
ub
D3DXSaveTextureToFileInMemory(ptr long ptr ptr)
@ st
ub
D3DXSaveTextureToFileW(ptr long ptr ptr)
@ st
dcall
D3DXSaveTextureToFileA(ptr long ptr ptr)
@ st
dcall
D3DXSaveTextureToFileInMemory(ptr long ptr ptr)
@ st
dcall
D3DXSaveTextureToFileW(ptr long ptr ptr)
@ stub D3DXSaveVolumeToFileA(ptr long ptr ptr ptr)
@ stub D3DXSaveVolumeToFileInMemory(ptr long ptr ptr ptr)
@ stub D3DXSaveVolumeToFileW(ptr long ptr ptr ptr)
...
...
dlls/d3dx9_36/texture.c
View file @
dfc5ab14
...
...
@@ -1606,3 +1606,64 @@ HRESULT WINAPI D3DXFillVolumeTexture(LPDIRECT3DVOLUMETEXTURE9 texture,
return
D3D_OK
;
}
HRESULT
WINAPI
D3DXSaveTextureToFileA
(
const
char
*
dst_filename
,
D3DXIMAGE_FILEFORMAT
file_format
,
IDirect3DBaseTexture9
*
src_texture
,
const
PALETTEENTRY
*
src_palette
)
{
int
len
;
WCHAR
*
filename
;
HRESULT
hr
;
ID3DXBuffer
*
buffer
;
TRACE
(
"(%s, %#x, %p, %p): relay
\n
"
,
wine_dbgstr_a
(
dst_filename
),
file_format
,
src_texture
,
src_palette
);
if
(
!
dst_filename
)
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
dst_filename
,
-
1
,
NULL
,
0
);
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
if
(
!
filename
)
return
E_OUTOFMEMORY
;
MultiByteToWideChar
(
CP_ACP
,
0
,
dst_filename
,
-
1
,
filename
,
len
);
hr
=
D3DXSaveTextureToFileInMemory
(
&
buffer
,
file_format
,
src_texture
,
src_palette
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
write_buffer_to_file
(
filename
,
buffer
);
ID3DXBuffer_Release
(
buffer
);
}
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
return
hr
;
}
HRESULT
WINAPI
D3DXSaveTextureToFileW
(
const
WCHAR
*
dst_filename
,
D3DXIMAGE_FILEFORMAT
file_format
,
IDirect3DBaseTexture9
*
src_texture
,
const
PALETTEENTRY
*
src_palette
)
{
HRESULT
hr
;
ID3DXBuffer
*
buffer
;
TRACE
(
"(%s, %#x, %p, %p): relay
\n
"
,
wine_dbgstr_w
(
dst_filename
),
file_format
,
src_texture
,
src_palette
);
if
(
!
dst_filename
)
return
D3DERR_INVALIDCALL
;
hr
=
D3DXSaveTextureToFileInMemory
(
&
buffer
,
file_format
,
src_texture
,
src_palette
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
write_buffer_to_file
(
dst_filename
,
buffer
);
ID3DXBuffer_Release
(
buffer
);
}
return
hr
;
}
HRESULT
WINAPI
D3DXSaveTextureToFileInMemory
(
ID3DXBuffer
**
dst_buffer
,
D3DXIMAGE_FILEFORMAT
file_format
,
IDirect3DBaseTexture9
*
src_texture
,
const
PALETTEENTRY
*
src_palette
)
{
FIXME
(
"(%p, %#x, %p, %p): stub
\n
"
,
dst_buffer
,
file_format
,
src_texture
,
src_palette
);
if
(
!
dst_buffer
||
!
src_texture
)
return
D3DERR_INVALIDCALL
;
return
E_NOTIMPL
;
}
include/d3dx9tex.h
View file @
dfc5ab14
...
...
@@ -638,6 +638,11 @@ HRESULT WINAPI D3DXCreateVolumeTextureFromFileInMemoryEx(LPDIRECT3DDEVICE9 devic
PALETTEENTRY
*
palette
,
LPDIRECT3DVOLUMETEXTURE9
*
volume
);
HRESULT
WINAPI
D3DXSaveTextureToFileInMemory
(
LPD3DXBUFFER
*
destbuffer
,
D3DXIMAGE_FILEFORMAT
destformat
,
LPDIRECT3DBASETEXTURE9
srctexture
,
CONST
PALETTEENTRY
*
srcpalette
);
HRESULT
WINAPI
D3DXSaveTextureToFileA
(
LPCSTR
destfile
,
D3DXIMAGE_FILEFORMAT
destformat
,
LPDIRECT3DBASETEXTURE9
srctexture
,
...
...
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