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
db6ea722
Commit
db6ea722
authored
Jul 02, 2009
by
Henri Verbeet
Committed by
Alexandre Julliard
Jul 02, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Get rid of the silly refcount for the "fake" GL context.
parent
b5da7f49
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
11 deletions
+2
-11
directx.c
dlls/wined3d/directx.c
+2
-11
No files found.
dlls/wined3d/directx.c
View file @
db6ea722
...
...
@@ -197,7 +197,6 @@ glMultiTexCoordFunc multi_texcoord_funcs[WINED3D_FFP_EMIT_COUNT];
* function query some info from GL.
*/
static
int
wined3d_fake_gl_context_ref
=
0
;
static
BOOL
wined3d_fake_gl_context_available
=
FALSE
;
static
HDC
wined3d_fake_gl_context_hdc
=
NULL
;
static
HWND
wined3d_fake_gl_context_hwnd
=
NULL
;
...
...
@@ -224,9 +223,6 @@ static void WineD3D_ReleaseFakeGLContext(void) {
}
glCtx
=
pwglGetCurrentContext
();
TRACE_
(
d3d_caps
)(
"decrementing ref from %i
\n
"
,
wined3d_fake_gl_context_ref
);
if
(
0
==
(
--
wined3d_fake_gl_context_ref
)
)
{
if
(
glCtx
)
{
TRACE_
(
d3d_caps
)(
"destroying fake GL context
\n
"
);
...
...
@@ -236,14 +232,13 @@ static void WineD3D_ReleaseFakeGLContext(void) {
}
pwglDeleteContext
(
glCtx
);
}
if
(
wined3d_fake_gl_context_hdc
)
if
(
wined3d_fake_gl_context_hdc
)
ReleaseDC
(
wined3d_fake_gl_context_hwnd
,
wined3d_fake_gl_context_hdc
);
wined3d_fake_gl_context_hdc
=
NULL
;
/* Make sure we don't think that it is still around */
if
(
wined3d_fake_gl_context_hwnd
)
if
(
wined3d_fake_gl_context_hwnd
)
DestroyWindow
(
wined3d_fake_gl_context_hwnd
);
wined3d_fake_gl_context_hwnd
=
NULL
;
wined3d_fake_gl_context_available
=
FALSE
;
}
LeaveCriticalSection
(
&
wined3d_fake_gl_context_cs
);
}
...
...
@@ -256,7 +251,6 @@ static BOOL WineD3D_CreateFakeGLContext(void) {
EnterCriticalSection
(
&
wined3d_fake_gl_context_cs
);
TRACE
(
"getting context...
\n
"
);
if
(
wined3d_fake_gl_context_ref
>
0
)
goto
ret
;
/* We need a fake window as a hdc retrieved using GetDC(0) can't be used for much GL purposes. */
wined3d_fake_gl_context_hwnd
=
CreateWindowA
(
WINED3D_OPENGL_WINDOW_CLASS_NAME
,
"WineD3D fake window"
,
...
...
@@ -309,9 +303,6 @@ static BOOL WineD3D_CreateFakeGLContext(void) {
}
context_set_last_device
(
NULL
);
ret:
TRACE
(
"incrementing ref from %i
\n
"
,
wined3d_fake_gl_context_ref
);
wined3d_fake_gl_context_ref
++
;
wined3d_fake_gl_context_available
=
TRUE
;
LeaveCriticalSection
(
&
wined3d_fake_gl_context_cs
);
return
TRUE
;
...
...
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