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
372984e0
Commit
372984e0
authored
May 25, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
May 25, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Don't use HEAP_ZERO_MEMORY if we're going to overwrite the memory anyway.
parent
b5d64260
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
surface.c
dlls/d3dx9_36/surface.c
+2
-2
texture.c
dlls/d3dx9_36/texture.c
+1
-1
No files found.
dlls/d3dx9_36/surface.c
View file @
372984e0
...
@@ -656,7 +656,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info)
...
@@ -656,7 +656,7 @@ HRESULT WINAPI D3DXGetImageInfoFromFileA(LPCSTR file, D3DXIMAGE_INFO *info)
if
(
!
file
)
return
D3DERR_INVALIDCALL
;
if
(
!
file
)
return
D3DERR_INVALIDCALL
;
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
file
,
-
1
,
NULL
,
0
);
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
file
,
-
1
,
NULL
,
0
);
widename
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
strlength
*
sizeof
(
WCHAR
));
widename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlength
*
sizeof
(
*
widename
));
MultiByteToWideChar
(
CP_ACP
,
0
,
file
,
-
1
,
widename
,
strlength
);
MultiByteToWideChar
(
CP_ACP
,
0
,
file
,
-
1
,
widename
,
strlength
);
hr
=
D3DXGetImageInfoFromFileW
(
widename
,
info
);
hr
=
D3DXGetImageInfoFromFileW
(
widename
,
info
);
...
@@ -918,7 +918,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(LPDIRECT3DSURFACE9 pDestSurface,
...
@@ -918,7 +918,7 @@ HRESULT WINAPI D3DXLoadSurfaceFromFileA(LPDIRECT3DSURFACE9 pDestSurface,
if
(
!
pSrcFile
||
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
if
(
!
pSrcFile
||
!
pDestSurface
)
return
D3DERR_INVALIDCALL
;
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
NULL
,
0
);
strlength
=
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
NULL
,
0
);
pWidename
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
strlength
*
sizeof
(
WCHAR
));
pWidename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlength
*
sizeof
(
*
pWidename
));
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
pWidename
,
strlength
);
MultiByteToWideChar
(
CP_ACP
,
0
,
pSrcFile
,
-
1
,
pWidename
,
strlength
);
hr
=
D3DXLoadSurfaceFromFileW
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pWidename
,
pSrcRect
,
dwFilter
,
Colorkey
,
pSrcInfo
);
hr
=
D3DXLoadSurfaceFromFileW
(
pDestSurface
,
pDestPalette
,
pDestRect
,
pWidename
,
pSrcRect
,
dwFilter
,
Colorkey
,
pSrcInfo
);
...
...
dlls/d3dx9_36/texture.c
View file @
372984e0
...
@@ -746,7 +746,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(LPDIRECT3DDEVICE9 device,
...
@@ -746,7 +746,7 @@ HRESULT WINAPI D3DXCreateTextureFromFileExA(LPDIRECT3DDEVICE9 device,
return
D3DERR_INVALIDCALL
;
return
D3DERR_INVALIDCALL
;
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
NULL
,
0
);
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
NULL
,
0
);
widename
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
len
*
sizeof
(
WCHAR
));
widename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
*
widename
));
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
widename
,
len
);
MultiByteToWideChar
(
CP_ACP
,
0
,
srcfile
,
-
1
,
widename
,
len
);
hr
=
D3DXCreateTextureFromFileExW
(
device
,
widename
,
width
,
height
,
miplevels
,
hr
=
D3DXCreateTextureFromFileExW
(
device
,
widename
,
width
,
height
,
miplevels
,
...
...
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