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
b9bfcf2c
Commit
b9bfcf2c
authored
Jun 16, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/tests: Get rid of some unused assignments.
parent
d8135b82
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
37 deletions
+29
-37
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+6
-8
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+8
-10
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+7
-9
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+8
-10
No files found.
dlls/ddraw/tests/ddraw1.c
View file @
b9bfcf2c
/*
/*
* Copyright 2011-201
2
Henri Verbeet for CodeWeavers
* Copyright 2011-201
4
Henri Verbeet for CodeWeavers
* Copyright 2012-2013 Stefan Dösinger for CodeWeavers
* Copyright 2012-2013 Stefan Dösinger for CodeWeavers
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
...
@@ -304,7 +304,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
...
@@ -304,7 +304,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
U2
(
surface_desc
).
dwZBufferBitDepth
=
z_depths
[
i
];
U2
(
surface_desc
).
dwZBufferBitDepth
=
z_depths
[
i
];
surface_desc
.
dwWidth
=
640
;
surface_desc
.
dwWidth
=
640
;
surface_desc
.
dwHeight
=
480
;
surface_desc
.
dwHeight
=
480
;
if
(
FAILED
(
hr
=
IDirectDraw_CreateSurface
(
ddraw
,
&
surface_desc
,
&
ds
,
NULL
)))
if
(
FAILED
(
IDirectDraw_CreateSurface
(
ddraw
,
&
surface_desc
,
&
ds
,
NULL
)))
continue
;
continue
;
hr
=
IDirectDrawSurface_AddAttachedSurface
(
surface
,
ds
);
hr
=
IDirectDrawSurface_AddAttachedSurface
(
surface
,
ds
);
...
@@ -313,7 +313,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
...
@@ -313,7 +313,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
continue
;
continue
;
if
(
SUCCEEDED
(
hr
=
IDirectDrawSurface_QueryInterface
(
surface
,
&
IID_IDirect3DHALDevice
,
(
void
**
)
&
device
)))
if
(
SUCCEEDED
(
IDirectDrawSurface_QueryInterface
(
surface
,
&
IID_IDirect3DHALDevice
,
(
void
**
)
&
device
)))
break
;
break
;
IDirectDrawSurface_DeleteAttachedSurface
(
surface
,
0
,
ds
);
IDirectDrawSurface_DeleteAttachedSurface
(
surface
,
0
,
ds
);
...
@@ -3990,14 +3990,13 @@ static void test_primary_palette(void)
...
@@ -3990,14 +3990,13 @@ static void test_primary_palette(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
if
(
FAILED
(
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw_Release
(
ddraw
);
IDirectDraw_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
@@ -5179,7 +5178,7 @@ static void test_palette_gdi(void)
...
@@ -5179,7 +5178,7 @@ static void test_palette_gdi(void)
refcount
=
IDirectDrawSurface_Release
(
surface
);
refcount
=
IDirectDrawSurface_Release
(
surface
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
if
(
FAILED
(
hr
=
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
if
(
FAILED
(
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDrawPalette_Release
(
palette
);
IDirectDrawPalette_Release
(
palette
);
...
@@ -5351,14 +5350,13 @@ static void test_palette_alpha(void)
...
@@ -5351,14 +5350,13 @@ static void test_palette_alpha(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
if
(
FAILED
(
IDirectDraw_SetDisplayMode
(
ddraw
,
640
,
480
,
8
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw_Release
(
ddraw
);
IDirectDraw_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
b9bfcf2c
/*
/*
* Copyright 2011-201
2
Henri Verbeet for CodeWeavers
* Copyright 2011-201
4
Henri Verbeet for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
...
@@ -236,7 +236,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
...
@@ -236,7 +236,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
U2
(
surface_desc
).
dwZBufferBitDepth
=
z_depths
[
i
];
U2
(
surface_desc
).
dwZBufferBitDepth
=
z_depths
[
i
];
surface_desc
.
dwWidth
=
640
;
surface_desc
.
dwWidth
=
640
;
surface_desc
.
dwHeight
=
480
;
surface_desc
.
dwHeight
=
480
;
if
(
FAILED
(
hr
=
IDirectDraw2_CreateSurface
(
ddraw
,
&
surface_desc
,
&
ds
,
NULL
)))
if
(
FAILED
(
IDirectDraw2_CreateSurface
(
ddraw
,
&
surface_desc
,
&
ds
,
NULL
)))
continue
;
continue
;
hr
=
IDirectDrawSurface_AddAttachedSurface
(
surface
,
ds
);
hr
=
IDirectDrawSurface_AddAttachedSurface
(
surface
,
ds
);
...
@@ -245,7 +245,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
...
@@ -245,7 +245,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
continue
;
continue
;
if
(
SUCCEEDED
(
hr
=
IDirect3D2_CreateDevice
(
d3d
,
&
IID_IDirect3DHALDevice
,
surface
,
&
device
)))
if
(
SUCCEEDED
(
IDirect3D2_CreateDevice
(
d3d
,
&
IID_IDirect3DHALDevice
,
surface
,
&
device
)))
break
;
break
;
IDirectDrawSurface_DeleteAttachedSurface
(
surface
,
0
,
ds
);
IDirectDrawSurface_DeleteAttachedSurface
(
surface
,
0
,
ds
);
...
@@ -835,7 +835,7 @@ static void test_surface_interface_mismatch(void)
...
@@ -835,7 +835,7 @@ static void test_surface_interface_mismatch(void)
goto
cleanup
;
goto
cleanup
;
}
}
if
(
FAILED
(
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirect3D2
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirect3D2
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
cleanup
;
goto
cleanup
;
...
@@ -3940,7 +3940,7 @@ static void test_rt_caps(void)
...
@@ -3940,7 +3940,7 @@ static void test_rt_caps(void)
ok
(
!!
z_depth
,
"Failed to get device z depth.
\n
"
);
ok
(
!!
z_depth
,
"Failed to get device z depth.
\n
"
);
IDirect3DDevice2_Release
(
device
);
IDirect3DDevice2_Release
(
device
);
if
(
FAILED
(
hr
=
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirect3D2
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw2_QueryInterface
(
ddraw
,
&
IID_IDirect3D2
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
done
;
goto
done
;
...
@@ -5066,14 +5066,13 @@ static void test_primary_palette(void)
...
@@ -5066,14 +5066,13 @@ static void test_primary_palette(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw2_Release
(
ddraw
);
IDirectDraw2_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
@@ -6247,7 +6246,7 @@ static void test_palette_gdi(void)
...
@@ -6247,7 +6246,7 @@ static void test_palette_gdi(void)
refcount
=
IDirectDrawSurface_Release
(
surface
);
refcount
=
IDirectDrawSurface_Release
(
surface
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
if
(
FAILED
(
hr
=
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDrawPalette_Release
(
palette
);
IDirectDrawPalette_Release
(
palette
);
...
@@ -6420,14 +6419,13 @@ static void test_palette_alpha(void)
...
@@ -6420,14 +6419,13 @@ static void test_palette_alpha(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw2_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw2_Release
(
ddraw
);
IDirectDraw2_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw2_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
b9bfcf2c
/*
/*
* Copyright 2011-201
2
Henri Verbeet for CodeWeavers
* Copyright 2011-201
4
Henri Verbeet for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers
* Copyright 2012-2014 Stefan Dösinger for CodeWeavers
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
...
@@ -1031,7 +1031,7 @@ static void test_surface_interface_mismatch(void)
...
@@ -1031,7 +1031,7 @@ static void test_surface_interface_mismatch(void)
hr
=
IDirectDrawSurface4_QueryInterface
(
surface
,
&
IID_IDirectDrawSurface3
,
(
void
**
)
&
surface3
);
hr
=
IDirectDrawSurface4_QueryInterface
(
surface
,
&
IID_IDirectDrawSurface3
,
(
void
**
)
&
surface3
);
ok
(
SUCCEEDED
(
hr
),
"Failed to QI IDirectDrawSurface3, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to QI IDirectDrawSurface3, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
cleanup
;
goto
cleanup
;
...
@@ -4689,7 +4689,7 @@ static void test_rt_caps(void)
...
@@ -4689,7 +4689,7 @@ static void test_rt_caps(void)
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
done
;
goto
done
;
...
@@ -5052,7 +5052,7 @@ static void test_surface_lock(void)
...
@@ -5052,7 +5052,7 @@ static void test_surface_lock(void)
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw4_QueryInterface
(
ddraw
,
&
IID_IDirect3D3
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
done
;
goto
done
;
...
@@ -5847,14 +5847,13 @@ static void test_primary_palette(void)
...
@@ -5847,14 +5847,13 @@ static void test_primary_palette(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw4_Release
(
ddraw
);
IDirectDraw4_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
@@ -7245,7 +7244,7 @@ static void test_palette_gdi(void)
...
@@ -7245,7 +7244,7 @@ static void test_palette_gdi(void)
refcount
=
IDirectDrawSurface4_Release
(
surface
);
refcount
=
IDirectDrawSurface4_Release
(
surface
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
if
(
FAILED
(
hr
=
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDrawPalette_Release
(
palette
);
IDirectDrawPalette_Release
(
palette
);
...
@@ -7417,14 +7416,13 @@ static void test_palette_alpha(void)
...
@@ -7417,14 +7416,13 @@ static void test_palette_alpha(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw4_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw4_Release
(
ddraw
);
IDirectDraw4_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw4_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
b9bfcf2c
/*
/*
* Copyright 2006, 2012-2014 Stefan Dösinger for CodeWeavers
* Copyright 2006, 2012-2014 Stefan Dösinger for CodeWeavers
* Copyright 2011 Henri Verbeet for CodeWeavers
* Copyright 2011
-2014
Henri Verbeet for CodeWeavers
*
*
* This library is free software; you can redistribute it and/or
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* modify it under the terms of the GNU Lesser General Public
...
@@ -948,7 +948,7 @@ static void test_surface_interface_mismatch(void)
...
@@ -948,7 +948,7 @@ static void test_surface_interface_mismatch(void)
hr
=
IDirectDrawSurface7_QueryInterface
(
surface
,
&
IID_IDirectDrawSurface3
,
(
void
**
)
&
surface3
);
hr
=
IDirectDrawSurface7_QueryInterface
(
surface
,
&
IID_IDirectDrawSurface3
,
(
void
**
)
&
surface3
);
ok
(
SUCCEEDED
(
hr
),
"Failed to QI IDirectDrawSurface3, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to QI IDirectDrawSurface3, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
cleanup
;
goto
cleanup
;
...
@@ -4460,7 +4460,7 @@ static void test_rt_caps(void)
...
@@ -4460,7 +4460,7 @@ static void test_rt_caps(void)
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
done
;
goto
done
;
...
@@ -4868,7 +4868,7 @@ static void test_surface_lock(void)
...
@@ -4868,7 +4868,7 @@ static void test_surface_lock(void)
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_NORMAL
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
if
(
FAILED
(
hr
=
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
if
(
FAILED
(
IDirectDraw7_QueryInterface
(
ddraw
,
&
IID_IDirect3D7
,
(
void
**
)
&
d3d
)))
{
{
skip
(
"D3D interface is not available, skipping test.
\n
"
);
skip
(
"D3D interface is not available, skipping test.
\n
"
);
goto
done
;
goto
done
;
...
@@ -5688,14 +5688,13 @@ static void test_primary_palette(void)
...
@@ -5688,14 +5688,13 @@ static void test_primary_palette(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw7_Release
(
ddraw
);
IDirectDraw7_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
@@ -5823,7 +5822,7 @@ static void test_surface_attachment(void)
...
@@ -5823,7 +5822,7 @@ static void test_surface_attachment(void)
U2
(
surface_desc
).
dwMipMapCount
=
3
;
U2
(
surface_desc
).
dwMipMapCount
=
3
;
surface_desc
.
dwWidth
=
128
;
surface_desc
.
dwWidth
=
128
;
surface_desc
.
dwHeight
=
128
;
surface_desc
.
dwHeight
=
128
;
if
(
FAILED
(
hr
=
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface1
,
NULL
)))
if
(
FAILED
(
IDirectDraw7_CreateSurface
(
ddraw
,
&
surface_desc
,
&
surface1
,
NULL
)))
{
{
skip
(
"Failed to create a texture, skipping tests.
\n
"
);
skip
(
"Failed to create a texture, skipping tests.
\n
"
);
IDirectDraw7_Release
(
ddraw
);
IDirectDraw7_Release
(
ddraw
);
...
@@ -6967,7 +6966,7 @@ static void test_palette_gdi(void)
...
@@ -6967,7 +6966,7 @@ static void test_palette_gdi(void)
refcount
=
IDirectDrawSurface7_Release
(
surface
);
refcount
=
IDirectDrawSurface7_Release
(
surface
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
ok
(
!
refcount
,
"Got unexpected refcount %u.
\n
"
,
refcount
);
if
(
FAILED
(
hr
=
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDrawPalette_Release
(
palette
);
IDirectDrawPalette_Release
(
palette
);
...
@@ -7139,14 +7138,13 @@ static void test_palette_alpha(void)
...
@@ -7139,14 +7138,13 @@ static void test_palette_alpha(void)
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
0
,
0
,
640
,
480
,
0
,
0
,
0
,
0
);
ddraw
=
create_ddraw
();
ddraw
=
create_ddraw
();
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
ok
(
!!
ddraw
,
"Failed to create a ddraw object.
\n
"
);
if
(
FAILED
(
hr
=
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
if
(
FAILED
(
IDirectDraw7_SetDisplayMode
(
ddraw
,
640
,
480
,
8
,
0
,
0
)))
{
{
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
win_skip
(
"Failed to set 8 bpp display mode, skipping test.
\n
"
);
IDirectDraw7_Release
(
ddraw
);
IDirectDraw7_Release
(
ddraw
);
DestroyWindow
(
window
);
DestroyWindow
(
window
);
return
;
return
;
}
}
ok
(
SUCCEEDED
(
hr
),
"Failed to set display mode, hr %#x.
\n
"
,
hr
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
hr
=
IDirectDraw7_SetCooperativeLevel
(
ddraw
,
window
,
DDSCL_EXCLUSIVE
|
DDSCL_FULLSCREEN
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to set cooperative level, hr %#x.
\n
"
,
hr
);
...
...
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