David Adam : d3dx9_36: Fix tests to make them pass in Windows.
Alexandre Julliard
julliard at winehq.org
Mon Jul 6 09:33:53 CDT 2009
Module: wine
Branch: master
Commit: db412878444145f17bf17adad4b3251ac8e39223
URL: http://source.winehq.org/git/wine.git/?a=commit;h=db412878444145f17bf17adad4b3251ac8e39223
Author: David Adam <david.adam.cnrs at gmail.com>
Date: Fri Jul 3 16:14:54 2009 +0200
d3dx9_36: Fix tests to make them pass in Windows.
---
dlls/d3dx9_36/tests/texture.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
index c2f47f2..7f10e2d 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -62,15 +62,20 @@ static const unsigned char noimage[4] = {
static HRESULT create_file(const char *filename, const unsigned char *data, const unsigned int size)
{
+ DWORD received;
HANDLE hfile;
- hfile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, 0, NULL);
+ hfile = CreateFileA(filename, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
if(hfile == INVALID_HANDLE_VALUE) return HRESULT_FROM_WIN32(GetLastError());
- WriteFile(hfile, data, size, NULL, NULL);
- CloseHandle(hfile);
+ if(WriteFile(hfile, data, size, &received, NULL))
+ {
+ CloseHandle(hfile);
+ return D3D_OK;
+ }
- return D3D_OK;
+ CloseHandle(hfile);
+ return D3DERR_INVALIDCALL;
}
static void test_D3DXGetImageInfo()
More information about the wine-cvs
mailing list