Commit 07cb7c66 authored by Luis C. Busquets Pérez's avatar Luis C. Busquets Pérez Committed by Alexandre Julliard

d3dx8: Implementation of D3DXAssembleShaderFromFileA.

parent 4714c4fa
......@@ -29,11 +29,10 @@
#include "wingdi.h"
#include "winuser.h"
#include "wine/debug.h"
#include "wine/unicode.h"
#include "d3dx8core.h"
#include "d3dx8core_private.h"
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
HRESULT WINAPI D3DXCreateBuffer(DWORD NumBytes, LPD3DXBUFFER* ppBuffer) {
......@@ -79,11 +78,21 @@ HRESULT WINAPI D3DXAssembleShaderFromFileA(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors) {
FIXME("(void): stub\n");
return D3D_OK;
LPWSTR pSrcFileW = NULL;
DWORD len;
HRESULT ret;
if (!pSrcFile) return D3DXERR_INVALIDDATA;
len = MultiByteToWideChar( CP_ACP, 0, pSrcFile, -1, NULL, 0 );
pSrcFileW = HeapAlloc( GetProcessHeap(), 0, len * sizeof(WCHAR) );
MultiByteToWideChar( CP_ACP, 0, pSrcFile, -1, pSrcFileW, len );
ret=D3DXAssembleShaderFromFileW(pSrcFileW, Flags, ppConstants, ppCompiledShader, ppCompilationErrors);
HeapFree( GetProcessHeap(), 0, pSrcFileW );
return ret;
}
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPSTR pSrcFile, DWORD Flags,
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPWSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors) {
......
......@@ -120,7 +120,7 @@ HRESULT WINAPI D3DXAssembleShaderFromFileA(LPSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPSTR pSrcFile, DWORD Flags,
HRESULT WINAPI D3DXAssembleShaderFromFileW(LPWSTR pSrcFile, DWORD Flags,
LPD3DXBUFFER* ppConstants,
LPD3DXBUFFER* ppCompiledShader,
LPD3DXBUFFER* ppCompilationErrors);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment