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
fb4c7e9f
Commit
fb4c7e9f
authored
Apr 06, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename "NumberOfSwapChains" to "swapchain_count".
parent
55555319
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
18 deletions
+22
-18
device.c
dlls/wined3d/device.c
+21
-17
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
fb4c7e9f
...
...
@@ -1308,19 +1308,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSwapChain(IWineD3DDevice *iface,
return
WINED3D_OK
;
}
/** NOTE: These are ahead of the other getters and setters to save using a forward declaration **/
static
UINT
WINAPI
IWineD3DDeviceImpl_GetNumberOfSwapChains
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p)
\n
"
,
This
);
static
UINT
WINAPI
IWineD3DDeviceImpl_GetNumberOfSwapChains
(
IWineD3DDevice
*
iface
)
{
IWineD3DDeviceImpl
*
device
=
(
IWineD3DDeviceImpl
*
)
iface
;
return
This
->
NumberOfSwapChains
;
TRACE
(
"iface %p.
\n
"
,
iface
);
return
device
->
swapchain_count
;
}
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetSwapChain
(
IWineD3DDevice
*
iface
,
UINT
iSwapChain
,
IWineD3DSwapChain
**
pSwapChain
)
{
static
HRESULT
WINAPI
IWineD3DDeviceImpl_GetSwapChain
(
IWineD3DDevice
*
iface
,
UINT
iSwapChain
,
IWineD3DSwapChain
**
pSwapChain
)
{
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
TRACE
(
"(%p) : swapchain %d
\n
"
,
This
,
iSwapChain
);
if
(
iSwapChain
<
This
->
NumberOfSwapChains
)
if
(
iSwapChain
<
This
->
swapchain_count
)
{
*
pSwapChain
=
(
IWineD3DSwapChain
*
)
This
->
swapchains
[
iSwapChain
];
IWineD3DSwapChain_AddRef
(
*
pSwapChain
);
...
...
@@ -1955,8 +1958,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
goto
err_out
;
}
This
->
NumberOfSwapChains
=
1
;
This
->
swapchains
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
NumberOfSwapChains
*
sizeof
(
*
This
->
swapchains
));
This
->
swapchain_count
=
1
;
This
->
swapchains
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
swapchain_count
*
sizeof
(
*
This
->
swapchains
));
if
(
!
This
->
swapchains
)
{
ERR
(
"Out of memory!
\n
"
);
...
...
@@ -2054,8 +2057,9 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Init3D(IWineD3DDevice *iface,
err_out:
HeapFree
(
GetProcessHeap
(),
0
,
This
->
render_targets
);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
swapchains
);
This
->
NumberOfSwapChains
=
0
;
if
(
This
->
palettes
)
{
This
->
swapchain_count
=
0
;
if
(
This
->
palettes
)
{
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palettes
[
0
]);
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palettes
);
}
...
...
@@ -2098,8 +2102,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl_InitGDI(IWineD3DDevice *iface,
goto
err_out
;
}
This
->
NumberOfSwapChains
=
1
;
This
->
swapchains
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
NumberOfSwapChains
*
sizeof
(
*
This
->
swapchains
));
This
->
swapchain_count
=
1
;
This
->
swapchains
=
HeapAlloc
(
GetProcessHeap
(),
0
,
This
->
swapchain_count
*
sizeof
(
*
This
->
swapchains
));
if
(
!
This
->
swapchains
)
{
ERR
(
"Out of memory!
\n
"
);
...
...
@@ -2259,7 +2263,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface,
context_release
(
context
);
for
(
i
=
0
;
i
<
This
->
NumberOfSwapChains
;
++
i
)
for
(
i
=
0
;
i
<
This
->
swapchain_count
;
++
i
)
{
TRACE
(
"Releasing the implicit swapchain %u.
\n
"
,
i
);
if
(
D3DCB_DestroySwapChain
((
IWineD3DSwapChain
*
)
This
->
swapchains
[
i
])
>
0
)
...
...
@@ -2270,7 +2274,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Uninit3D(IWineD3DDevice *iface,
HeapFree
(
GetProcessHeap
(),
0
,
This
->
swapchains
);
This
->
swapchains
=
NULL
;
This
->
NumberOfSwapChains
=
0
;
This
->
swapchain_count
=
0
;
for
(
i
=
0
;
i
<
This
->
palette_count
;
++
i
)
HeapFree
(
GetProcessHeap
(),
0
,
This
->
palettes
[
i
]);
...
...
@@ -2290,7 +2294,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UninitGDI(IWineD3DDevice *iface, D3DCB_
IWineD3DDeviceImpl
*
This
=
(
IWineD3DDeviceImpl
*
)
iface
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
This
->
NumberOfSwapChains
;
++
i
)
for
(
i
=
0
;
i
<
This
->
swapchain_count
;
++
i
)
{
TRACE
(
"Releasing the implicit swapchain %u.
\n
"
,
i
);
if
(
D3DCB_DestroySwapChain
((
IWineD3DSwapChain
*
)
This
->
swapchains
[
i
])
>
0
)
...
...
@@ -2301,7 +2305,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UninitGDI(IWineD3DDevice *iface, D3DCB_
HeapFree
(
GetProcessHeap
(),
0
,
This
->
swapchains
);
This
->
swapchains
=
NULL
;
This
->
NumberOfSwapChains
=
0
;
This
->
swapchain_count
=
0
;
return
WINED3D_OK
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
fb4c7e9f
...
...
@@ -1708,7 +1708,7 @@ struct IWineD3DDeviceImpl
HWND
focus_window
;
IWineD3DSwapChainImpl
**
swapchains
;
UINT
NumberOfSwapChains
;
UINT
swapchain_count
;
struct
list
resources
;
/* a linked list to track resources created by the device */
struct
list
shaders
;
/* a linked list to track shaders (pixel and vertex) */
...
...
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