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
00ddebfa
Commit
00ddebfa
authored
Oct 27, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix a memory leak (spotted by Eric Pouech).
parent
b6c325bf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
directx.c
dlls/wined3d/directx.c
+6
-4
wined3d_gl.h
include/wine/wined3d_gl.h
+0
-1
No files found.
dlls/wined3d/directx.c
View file @
00ddebfa
...
...
@@ -73,7 +73,7 @@ DWORD minMipLookup[WINED3DTEXF_ANISOTROPIC + 1][WINED3DTEXF_LINEAR + 1];
* function query some info from GL
*/
static
WineD3D_Context
*
WineD3D_CreateFakeGLContext
(
void
)
{
static
WineD3D_Context
ctx
=
{
NULL
,
NULL
,
NULL
,
0
,
0
}
;
static
WineD3D_Context
ctx
;
WineD3D_Context
*
ret
=
NULL
;
if
(
glXGetCurrentContext
()
==
NULL
)
{
...
...
@@ -84,6 +84,7 @@ static WineD3D_Context* WineD3D_CreateFakeGLContext(void) {
Visual
*
visual
;
BOOL
failed
=
FALSE
;
int
num
;
XVisualInfo
*
visInfo
;
XWindowAttributes
win_attr
;
TRACE_
(
d3d_caps
)(
"Creating Fake GL Context
\n
"
);
...
...
@@ -102,8 +103,8 @@ static WineD3D_Context* WineD3D_CreateFakeGLContext(void) {
visual
=
DefaultVisual
(
ctx
.
display
,
DefaultScreen
(
ctx
.
display
));
}
template
.
visualid
=
XVisualIDFromVisual
(
visual
);
ctx
.
visInfo
=
XGetVisualInfo
(
ctx
.
display
,
VisualIDMask
,
&
template
,
&
num
);
if
(
ctx
.
visInfo
==
NULL
)
{
visInfo
=
XGetVisualInfo
(
ctx
.
display
,
VisualIDMask
,
&
template
,
&
num
);
if
(
visInfo
==
NULL
)
{
LEAVE_GL
();
WARN_
(
d3d_caps
)(
"Error creating visual info for capabilities initialization
\n
"
);
failed
=
TRUE
;
...
...
@@ -111,7 +112,8 @@ static WineD3D_Context* WineD3D_CreateFakeGLContext(void) {
/* Create a GL context */
if
(
!
failed
)
{
ctx
.
glCtx
=
glXCreateContext
(
ctx
.
display
,
ctx
.
visInfo
,
NULL
,
GL_TRUE
);
ctx
.
glCtx
=
glXCreateContext
(
ctx
.
display
,
visInfo
,
NULL
,
GL_TRUE
);
XFree
(
visInfo
);
if
(
ctx
.
glCtx
==
NULL
)
{
LEAVE_GL
();
...
...
include/wine/wined3d_gl.h
View file @
00ddebfa
...
...
@@ -1797,7 +1797,6 @@ typedef struct _WineD3D_GL_Info {
typedef
struct
_WineD3D_GLContext
{
GLXContext
glCtx
;
XVisualInfo
*
visInfo
;
Display
*
display
;
Drawable
drawable
;
LONG
ref
;
...
...
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