Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d6ead897
Commit
d6ead897
authored
Sep 08, 2010
by
Matteo Bruni
Committed by
Alexandre Julliard
Sep 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9: Fix D3DXCompileShaderFromFileW.
parent
4a5b2abc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
shader.c
dlls/d3dx9_36/shader.c
+4
-3
No files found.
dlls/d3dx9_36/shader.c
View file @
d6ead897
...
...
@@ -423,7 +423,7 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
LPD3DXCONSTANTTABLE
*
constant_table
)
{
void
*
buffer
;
DWORD
len
;
DWORD
len
,
filename_len
;
HRESULT
hr
;
struct
D3DXIncludeImpl
includefromfile
;
char
*
filename_a
;
...
...
@@ -437,13 +437,14 @@ HRESULT WINAPI D3DXCompileShaderFromFileW(LPCWSTR filename,
include
=
(
LPD3DXINCLUDE
)
&
includefromfile
;
}
filename_a
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
char
));
filename_len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
filename
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
filename_a
=
HeapAlloc
(
GetProcessHeap
(),
0
,
filename_len
*
sizeof
(
char
));
if
(
!
filename_a
)
{
UnmapViewOfFile
(
buffer
);
return
E_OUTOFMEMORY
;
}
WideCharToMultiByte
(
CP_ACP
,
0
,
filename
,
-
1
,
filename_a
,
len
,
NULL
,
NULL
);
WideCharToMultiByte
(
CP_ACP
,
0
,
filename
,
-
1
,
filename_a
,
filename_
len
,
NULL
,
NULL
);
hr
=
D3DCompile
(
buffer
,
len
,
filename_a
,
(
D3D_SHADER_MACRO
*
)
defines
,
(
ID3DInclude
*
)
include
,
entrypoint
,
profile
,
flags
,
0
,
...
...
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