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
f250ee66
Commit
f250ee66
authored
Jan 18, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Pass an IWineD3DSwapChainImpl pointer to findThreadContextForSwapChain().
parent
b439fa9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
12 deletions
+8
-12
context.c
dlls/wined3d/context.c
+8
-12
No files found.
dlls/wined3d/context.c
View file @
f250ee66
...
...
@@ -1866,19 +1866,18 @@ static void SetupForBlit(IWineD3DDeviceImpl *This, struct wined3d_context *conte
* If none can be found the swapchain is requested to create a new context
*
*****************************************************************************/
static
struct
wined3d_context
*
findThreadContextForSwapChain
(
IWineD3DSwapChain
*
swapchain
,
DWORD
tid
)
static
struct
wined3d_context
*
findThreadContextForSwapChain
(
struct
IWineD3DSwapChainImpl
*
swapchain
,
DWORD
tid
)
{
unsigned
int
i
;
for
(
i
=
0
;
i
<
((
IWineD3DSwapChainImpl
*
)
swapchain
)
->
num_contexts
;
i
++
)
{
if
(((
IWineD3DSwapChainImpl
*
)
swapchain
)
->
context
[
i
]
->
tid
==
tid
)
{
return
((
IWineD3DSwapChainImpl
*
)
swapchain
)
->
context
[
i
];
}
for
(
i
=
0
;
i
<
swapchain
->
num_contexts
;
++
i
)
{
if
(
swapchain
->
context
[
i
]
->
tid
==
tid
)
return
swapchain
->
context
[
i
];
}
/* Create a new context for the thread */
return
swapchain_create_context_for_thread
(
(
IWineD3DSwapChainImpl
*
)
swapchain
);
return
swapchain_create_context_for_thread
(
swapchain
);
}
/* Do not call while under the GL lock. */
...
...
@@ -1914,12 +1913,9 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
if
(
target
->
container
.
type
==
WINED3D_CONTAINER_SWAPCHAIN
)
{
IWineD3DSwapChain
*
swapchain
;
TRACE
(
"Rendering onscreen
\n
"
);
swapchain
=
(
IWineD3DSwapChain
*
)
target
->
container
.
u
.
swapchain
;
context
=
findThreadContextForSwapChain
(
swapchain
,
tid
);
context
=
findThreadContextForSwapChain
(
target
->
container
.
u
.
swapchain
,
tid
);
}
else
{
...
...
@@ -1938,7 +1934,7 @@ static struct wined3d_context *FindContext(IWineD3DDeviceImpl *This, IWineD3DSur
*
* Can also happen on thread switches - in that case findThreadContextForSwapChain
* is perfect to call. */
context
=
findThreadContextForSwapChain
(
This
->
swapchains
[
0
],
tid
);
context
=
findThreadContextForSwapChain
(
(
IWineD3DSwapChainImpl
*
)
This
->
swapchains
[
0
],
tid
);
}
}
...
...
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