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
2a24b11a
Commit
2a24b11a
authored
Sep 02, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 02, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Avoid LPWSTR.
parent
0be8e524
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
26 deletions
+43
-26
effect.c
dlls/d3dx9_36/effect.c
+8
-4
mesh.c
dlls/d3dx9_36/mesh.c
+13
-9
shader.c
dlls/d3dx9_36/shader.c
+10
-2
surface.c
dlls/d3dx9_36/surface.c
+7
-7
texture.c
dlls/d3dx9_36/texture.c
+5
-4
No files found.
dlls/d3dx9_36/effect.c
View file @
2a24b11a
...
...
@@ -5531,11 +5531,14 @@ HRESULT WINAPI D3DXCreateEffectFromFileExA(struct IDirect3DDevice9 *device, cons
const
D3DXMACRO
*
defines
,
struct
ID3DXInclude
*
include
,
const
char
*
skipconstants
,
DWORD
flags
,
struct
ID3DXEffectPool
*
pool
,
struct
ID3DXEffect
**
effect
,
struct
ID3DXBuffer
**
compilationerrors
)
{
LPWSTR
srcfileW
;
WCHAR
*
srcfileW
;
HRESULT
ret
;
DWORD
len
;
TRACE
(
"(void): relay
\n
"
);
TRACE
(
"device %p, srcfile %s, defines %p, include %p, skipconstants %s, "
"flags %#x, pool %p, effect %p, compilationerrors %p.
\n
"
,
device
,
debugstr_a
(
srcfile
),
defines
,
include
,
debugstr_a
(
skipconstants
),
flags
,
pool
,
effect
,
compilationerrors
);
if
(
!
srcfile
)
return
D3DERR_INVALIDCALL
;
...
...
@@ -5660,11 +5663,12 @@ HRESULT WINAPI D3DXCreateEffectCompilerFromFileW(const WCHAR *srcfile, const D3D
HRESULT
WINAPI
D3DXCreateEffectCompilerFromFileA
(
const
char
*
srcfile
,
const
D3DXMACRO
*
defines
,
ID3DXInclude
*
include
,
DWORD
flags
,
ID3DXEffectCompiler
**
effectcompiler
,
ID3DXBuffer
**
parseerrors
)
{
LPWSTR
srcfileW
;
WCHAR
*
srcfileW
;
HRESULT
ret
;
DWORD
len
;
TRACE
(
"(void): relay
\n
"
);
TRACE
(
"srcfile %s, defines %p, include %p, flags %#x, effectcompiler %p, parseerrors %p.
\n
"
,
debugstr_a
(
srcfile
),
defines
,
include
,
flags
,
effectcompiler
,
parseerrors
);
if
(
!
srcfile
)
return
D3DERR_INVALIDCALL
;
...
...
dlls/d3dx9_36/mesh.c
View file @
2a24b11a
...
...
@@ -3673,12 +3673,14 @@ HRESULT WINAPI D3DXLoadMeshHierarchyFromXA(const char *filename, DWORD options,
struct
ID3DXAllocateHierarchy
*
alloc_hier
,
struct
ID3DXLoadUserData
*
load_user_data
,
D3DXFRAME
**
frame_hierarchy
,
struct
ID3DXAnimationController
**
anim_controller
)
{
WCHAR
*
filenameW
;
HRESULT
hr
;
int
len
;
LPWSTR
filenameW
;
TRACE
(
"(%s, %x, %p, %p, %p, %p, %p)
\n
"
,
debugstr_a
(
filename
),
options
,
device
,
alloc_hier
,
load_user_data
,
frame_hierarchy
,
anim_controller
);
TRACE
(
"filename %s, options %#x, device %p, alloc_hier %p, "
"load_user_data %p, frame_hierarchy %p, anim_controller %p.
\n
"
,
debugstr_a
(
filename
),
options
,
device
,
alloc_hier
,
load_user_data
,
frame_hierarchy
,
anim_controller
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
...
...
@@ -4025,12 +4027,14 @@ HRESULT WINAPI D3DXLoadMeshFromXA(const char *filename, DWORD options, struct ID
struct
ID3DXBuffer
**
adjacency
,
struct
ID3DXBuffer
**
materials
,
struct
ID3DXBuffer
**
effect_instances
,
DWORD
*
num_materials
,
struct
ID3DXMesh
**
mesh
)
{
WCHAR
*
filenameW
;
HRESULT
hr
;
int
len
;
LPWSTR
filenameW
;
TRACE
(
"(%s, %x, %p, %p, %p, %p, %p, %p)
\n
"
,
debugstr_a
(
filename
),
options
,
device
,
adjacency
,
materials
,
effect_instances
,
num_materials
,
mesh
);
TRACE
(
"filename %s, options %#x, device %p, adjacency %p, materials %p, "
"effect_instances %p, num_materials %p, mesh %p.
\n
"
,
debugstr_a
(
filename
),
options
,
device
,
adjacency
,
materials
,
effect_instances
,
num_materials
,
mesh
);
if
(
!
filename
)
return
D3DERR_INVALIDCALL
;
...
...
@@ -4943,12 +4947,12 @@ HRESULT WINAPI D3DXCreateTeapot(struct IDirect3DDevice9 *device,
HRESULT
WINAPI
D3DXCreateTextA
(
struct
IDirect3DDevice9
*
device
,
HDC
hdc
,
const
char
*
text
,
float
deviation
,
float
extrusion
,
struct
ID3DXMesh
**
mesh
,
struct
ID3DXBuffer
**
adjacency
,
GLYPHMETRICSFLOAT
*
glyphmetrics
)
{
WCHAR
*
textW
;
HRESULT
hr
;
int
len
;
LPWSTR
textW
;
TRACE
(
"
(%p, %p, %s, %f, %f, %p, %p, %p)
\n
"
,
device
,
hdc
,
debugstr_a
(
text
),
deviation
,
extrusion
,
mesh
,
adjacency
,
glyphmetrics
);
TRACE
(
"
device %p, hdc %p, text %s, deviation %.8e, extrusion %.8e, mesh %p, adjacency %p, glyphmetrics %p.
\n
"
,
device
,
hdc
,
debugstr_a
(
text
),
deviation
,
extrusion
,
mesh
,
adjacency
,
glyphmetrics
);
if
(
!
text
)
return
D3DERR_INVALIDCALL
;
...
...
dlls/d3dx9_36/shader.c
View file @
2a24b11a
...
...
@@ -284,10 +284,13 @@ struct D3DXIncludeImpl {
HRESULT
WINAPI
D3DXAssembleShaderFromFileA
(
const
char
*
filename
,
const
D3DXMACRO
*
defines
,
ID3DXInclude
*
include
,
DWORD
flags
,
ID3DXBuffer
**
shader
,
ID3DXBuffer
**
error_messages
)
{
LPWSTR
filename_w
=
NULL
;
WCHAR
*
filename_w
;
DWORD
len
;
HRESULT
ret
;
TRACE
(
"filename %s, defines %p, include %p, flags %#x, shader %p, error_messages %p.
\n
"
,
debugstr_a
(
filename
),
defines
,
include
,
flags
,
shader
,
error_messages
);
if
(
!
filename
)
return
D3DXERR_INVALIDDATA
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
...
...
@@ -387,10 +390,15 @@ HRESULT WINAPI D3DXCompileShaderFromFileA(const char *filename, const D3DXMACRO
ID3DXInclude
*
include
,
const
char
*
entrypoint
,
const
char
*
profile
,
DWORD
flags
,
ID3DXBuffer
**
shader
,
ID3DXBuffer
**
error_messages
,
ID3DXConstantTable
**
constant_table
)
{
LPWSTR
filename_w
=
NULL
;
WCHAR
*
filename_w
;
DWORD
len
;
HRESULT
ret
;
TRACE
(
"filename %s, defines %p, include %p, entrypoint %s, profile %s, "
"flags %#x, shader %p, error_messages %p, constant_table %p.
\n
"
,
debugstr_a
(
filename
),
defines
,
include
,
debugstr_a
(
entrypoint
),
debugstr_a
(
profile
),
flags
,
shader
,
error_messages
,
constant_table
);
if
(
!
filename
)
return
D3DXERR_INVALIDDATA
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
);
...
...
dlls/d3dx9_36/surface.c
View file @
2a24b11a
...
...
@@ -901,11 +901,11 @@ HRESULT WINAPI D3DXGetImageInfoFromFileInMemory(const void *data, UINT datasize,
*/
HRESULT
WINAPI
D3DXGetImageInfoFromFileA
(
LPCSTR
file
,
D3DXIMAGE_INFO
*
info
)
{
LPWSTR
widename
;
WCHAR
*
widename
;
HRESULT
hr
;
int
strlength
;
TRACE
(
"
(%s, %p): relay
\n
"
,
debugstr_a
(
file
),
info
);
TRACE
(
"
file %s, info %p.
\n
"
,
debugstr_a
(
file
),
info
);
if
(
!
file
)
return
D3DERR_INVALIDCALL
;
...
...
@@ -1188,7 +1188,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(IDirect3DSurface9 *dst_surface,
const
PALETTEENTRY
*
dst_palette
,
const
RECT
*
dst_rect
,
const
char
*
src_file
,
const
RECT
*
src_rect
,
DWORD
filter
,
D3DCOLOR
color_key
,
D3DXIMAGE_INFO
*
src_info
)
{
LPWSTR
pWidename
;
WCHAR
*
src_file_w
;
HRESULT
hr
;
int
strlength
;
...
...
@@ -1201,12 +1201,12 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(IDirect3DSurface9 *dst_surface,
return
D3DERR_INVALIDCALL
;
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
src_file
,
-
1
,
NULL
,
0
);
pWidename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlength
*
sizeof
(
*
pWidename
));
MultiByteToWideChar
(
CP_ACP
,
0
,
src_file
,
-
1
,
pWidename
,
strlength
);
src_file_w
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlength
*
sizeof
(
*
src_file_w
));
MultiByteToWideChar
(
CP_ACP
,
0
,
src_file
,
-
1
,
src_file_w
,
strlength
);
hr
=
D3DXLoadSurfaceFromFileW
(
dst_surface
,
dst_palette
,
dst_rect
,
pWidename
,
src_rect
,
filter
,
color_key
,
src_info
);
HeapFree
(
GetProcessHeap
(),
0
,
pWidename
);
src_file_w
,
src_rect
,
filter
,
color_key
,
src_info
);
HeapFree
(
GetProcessHeap
(),
0
,
src_file_w
);
return
hr
;
}
...
...
dlls/d3dx9_36/texture.c
View file @
2a24b11a
...
...
@@ -719,13 +719,14 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(struct IDirect3DDevice9 *device, con
D3DPOOL
pool
,
DWORD
filter
,
DWORD
mipfilter
,
D3DCOLOR
colorkey
,
D3DXIMAGE_INFO
*
srcinfo
,
PALETTEENTRY
*
palette
,
struct
IDirect3DTexture9
**
texture
)
{
LPWSTR
widename
;
WCHAR
*
widename
;
HRESULT
hr
;
DWORD
len
;
TRACE
(
"(%p, %s, %u, %u, %u, %x, %x, %x, %u, %u, %x, %p, %p, %p): relay
\n
"
,
device
,
debugstr_a
(
srcfile
),
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
TRACE
(
"device %p, srcfile %s, width %u, height %u, miplevels %u, usage %#x, format %#x, "
"pool %#x, filter %#x, mipfilter %#x, colorkey 0x%08x, srcinfo %p, palette %p, texture %p.
\n
"
,
device
,
debugstr_a
(
srcfile
),
width
,
height
,
miplevels
,
usage
,
format
,
pool
,
filter
,
mipfilter
,
colorkey
,
srcinfo
,
palette
,
texture
);
if
(
!
device
||
!
srcfile
||
!
texture
)
return
D3DERR_INVALIDCALL
;
...
...
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