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
1de01fca
Commit
1de01fca
authored
Nov 11, 2022
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3drm/tests: Use CRT allocation functions.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
parent
55fbd32b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
d3drm.c
dlls/d3drm/tests/d3drm.c
+7
-7
No files found.
dlls/d3drm/tests/d3drm.c
View file @
1de01fca
...
@@ -6163,7 +6163,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
...
@@ -6163,7 +6163,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
ret
=
GetTempPathA
(
MAX_PATH
,
path
);
ret
=
GetTempPathA
(
MAX_PATH
,
path
);
ok
(
ret
,
"Failed to get temporary file path.
\n
"
);
ok
(
ret
,
"Failed to get temporary file path.
\n
"
);
filename
=
HeapAlloc
(
GetProcessHeap
(),
0
,
MAX_PATH
);
filename
=
malloc
(
MAX_PATH
);
ret
=
GetTempFileNameA
(
path
,
"d3d"
,
0
,
filename
);
ret
=
GetTempFileNameA
(
path
,
"d3d"
,
0
,
filename
);
ok
(
ret
,
"Failed to get filename.
\n
"
);
ok
(
ret
,
"Failed to get filename.
\n
"
);
file
=
CreateFileA
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
file
=
CreateFileA
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
OPEN_EXISTING
,
0
,
NULL
);
...
@@ -6178,7 +6178,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
...
@@ -6178,7 +6178,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
ret
=
WriteFile
(
file
,
&
file_header
,
sizeof
(
file_header
),
&
written
,
NULL
);
ret
=
WriteFile
(
file
,
&
file_header
,
sizeof
(
file_header
),
&
written
,
NULL
);
ok
(
ret
&&
written
==
sizeof
(
file_header
),
"Failed to write file header.
\n
"
);
ok
(
ret
&&
written
==
sizeof
(
file_header
),
"Failed to write file header.
\n
"
);
info
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
info
=
calloc
(
1
,
size
);
info
->
bmiHeader
.
biSize
=
sizeof
(
info
->
bmiHeader
);
info
->
bmiHeader
.
biSize
=
sizeof
(
info
->
bmiHeader
);
info
->
bmiHeader
.
biBitCount
=
bpp
;
info
->
bmiHeader
.
biBitCount
=
bpp
;
info
->
bmiHeader
.
biPlanes
=
1
;
info
->
bmiHeader
.
biPlanes
=
1
;
...
@@ -6196,10 +6196,10 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
...
@@ -6196,10 +6196,10 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
}
}
ret
=
WriteFile
(
file
,
info
,
size
,
&
written
,
NULL
);
ret
=
WriteFile
(
file
,
info
,
size
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
size
,
"Failed to write bitmap info.
\n
"
);
ok
(
ret
&&
written
==
size
,
"Failed to write bitmap info.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
info
);
free
(
info
);
size
=
w
*
h
*
(
bpp
/
8
);
size
=
w
*
h
*
(
bpp
/
8
);
buffer
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
size
);
buffer
=
calloc
(
1
,
size
);
for
(
i
=
0
,
j
=
0
;
i
<
size
;)
for
(
i
=
0
,
j
=
0
;
i
<
size
;)
{
{
if
(
palettized
)
if
(
palettized
)
...
@@ -6216,7 +6216,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
...
@@ -6216,7 +6216,7 @@ static char *create_bitmap(unsigned int w, unsigned int h, BOOL palettized)
}
}
ret
=
WriteFile
(
file
,
buffer
,
size
,
&
written
,
NULL
);
ret
=
WriteFile
(
file
,
buffer
,
size
,
&
written
,
NULL
);
ok
(
ret
&&
written
==
size
,
"Failed to write bitmap data.
\n
"
);
ok
(
ret
&&
written
==
size
,
"Failed to write bitmap data.
\n
"
);
HeapFree
(
GetProcessHeap
(),
0
,
buffer
);
free
(
buffer
);
CloseHandle
(
file
);
CloseHandle
(
file
);
...
@@ -6515,7 +6515,7 @@ static void test_load_texture(void)
...
@@ -6515,7 +6515,7 @@ static void test_load_texture(void)
ret
=
DeleteFileA
(
filename
);
ret
=
DeleteFileA
(
filename
);
ok
(
ret
,
"Failed to delete bitmap
\"
%s
\"
.
\n
"
,
filename
);
ok
(
ret
,
"Failed to delete bitmap
\"
%s
\"
.
\n
"
,
filename
);
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
free
(
filename
);
winetest_pop_context
();
winetest_pop_context
();
}
}
...
@@ -6647,7 +6647,7 @@ static void test_texture_qi(void)
...
@@ -6647,7 +6647,7 @@ static void test_texture_qi(void)
IDirect3DRM_Release
(
d3drm1
);
IDirect3DRM_Release
(
d3drm1
);
check
=
DeleteFileA
(
filename
);
check
=
DeleteFileA
(
filename
);
ok
(
check
,
"Cannot delete image stored in %s (error = %ld).
\n
"
,
filename
,
GetLastError
());
ok
(
check
,
"Cannot delete image stored in %s (error = %ld).
\n
"
,
filename
,
GetLastError
());
HeapFree
(
GetProcessHeap
(),
0
,
filename
);
free
(
filename
);
}
}
static
void
test_viewport_qi
(
void
)
static
void
test_viewport_qi
(
void
)
...
...
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