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
c6424813
Commit
c6424813
authored
May 26, 2009
by
Francois Gouget
Committed by
Alexandre Julliard
May 26, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Replace an strdup() with HeapAlloc() in the OpenGL code.
Free the corresponding memory when the library is unloaded.
parent
19020b9e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
3 deletions
+14
-3
opengl.c
dlls/winex11.drv/opengl.c
+12
-3
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+1
-0
No files found.
dlls/winex11.drv/opengl.c
View file @
c6424813
...
@@ -76,7 +76,7 @@ typedef struct wine_glextension {
...
@@ -76,7 +76,7 @@ typedef struct wine_glextension {
struct
WineGLInfo
{
struct
WineGLInfo
{
const
char
*
glVersion
;
const
char
*
glVersion
;
c
onst
c
har
*
glExtensions
;
char
*
glExtensions
;
int
glxVersion
[
2
];
int
glxVersion
[
2
];
...
@@ -274,12 +274,13 @@ MAKE_FUNCPTR(glFinish)
...
@@ -274,12 +274,13 @@ MAKE_FUNCPTR(glFinish)
MAKE_FUNCPTR
(
glFlush
)
MAKE_FUNCPTR
(
glFlush
)
#undef MAKE_FUNCPTR
#undef MAKE_FUNCPTR
static
BOOL
infoInitialized
=
FALSE
;
static
BOOL
X11DRV_WineGL_InitOpenglInfo
(
void
)
static
BOOL
X11DRV_WineGL_InitOpenglInfo
(
void
)
{
{
static
BOOL
infoInitialized
=
FALSE
;
int
screen
=
DefaultScreen
(
gdi_display
);
int
screen
=
DefaultScreen
(
gdi_display
);
Window
win
=
RootWindow
(
gdi_display
,
screen
);
Window
win
=
RootWindow
(
gdi_display
,
screen
);
const
char
*
str
;
Visual
*
visual
;
Visual
*
visual
;
XVisualInfo
template
;
XVisualInfo
template
;
XVisualInfo
*
vis
;
XVisualInfo
*
vis
;
...
@@ -318,7 +319,9 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
...
@@ -318,7 +319,9 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
}
}
WineGLInfo
.
glVersion
=
(
const
char
*
)
pglGetString
(
GL_VERSION
);
WineGLInfo
.
glVersion
=
(
const
char
*
)
pglGetString
(
GL_VERSION
);
WineGLInfo
.
glExtensions
=
strdup
((
const
char
*
)
pglGetString
(
GL_EXTENSIONS
));
str
=
(
const
char
*
)
pglGetString
(
GL_EXTENSIONS
);
WineGLInfo
.
glExtensions
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
str
)
+
1
);
strcpy
(
WineGLInfo
.
glExtensions
,
str
);
/* Get the common GLX version supported by GLX client and server ( major/minor) */
/* Get the common GLX version supported by GLX client and server ( major/minor) */
pglXQueryVersion
(
gdi_display
,
&
WineGLInfo
.
glxVersion
[
0
],
&
WineGLInfo
.
glxVersion
[
1
]);
pglXQueryVersion
(
gdi_display
,
&
WineGLInfo
.
glxVersion
[
0
],
&
WineGLInfo
.
glxVersion
[
1
]);
...
@@ -352,6 +355,12 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
...
@@ -352,6 +355,12 @@ static BOOL X11DRV_WineGL_InitOpenglInfo(void)
return
TRUE
;
return
TRUE
;
}
}
void
X11DRV_OpenGL_Cleanup
(
void
)
{
HeapFree
(
GetProcessHeap
(),
0
,
WineGLInfo
.
glExtensions
);
infoInitialized
=
FALSE
;
}
static
BOOL
has_opengl
(
void
)
static
BOOL
has_opengl
(
void
)
{
{
static
int
init_done
;
static
int
init_done
;
...
...
dlls/winex11.drv/x11drv.h
View file @
c6424813
...
@@ -226,6 +226,7 @@ extern int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
...
@@ -226,6 +226,7 @@ extern int CDECL X11DRV_DescribePixelFormat(X11DRV_PDEVICE *physDev,
PIXELFORMATDESCRIPTOR
*
ppfd
);
PIXELFORMATDESCRIPTOR
*
ppfd
);
extern
int
CDECL
X11DRV_GetPixelFormat
(
X11DRV_PDEVICE
*
physDev
);
extern
int
CDECL
X11DRV_GetPixelFormat
(
X11DRV_PDEVICE
*
physDev
);
extern
BOOL
CDECL
X11DRV_SwapBuffers
(
X11DRV_PDEVICE
*
physDev
);
extern
BOOL
CDECL
X11DRV_SwapBuffers
(
X11DRV_PDEVICE
*
physDev
);
extern
void
X11DRV_OpenGL_Cleanup
(
void
);
/* X11 driver internal functions */
/* X11 driver internal functions */
...
...
dlls/winex11.drv/x11drv_main.c
View file @
c6424813
...
@@ -587,6 +587,7 @@ static void process_detach(void)
...
@@ -587,6 +587,7 @@ static void process_detach(void)
/* cleanup GDI */
/* cleanup GDI */
X11DRV_GDI_Finalize
();
X11DRV_GDI_Finalize
();
X11DRV_OpenGL_Cleanup
();
IME_UnregisterClasses
();
IME_UnregisterClasses
();
DeleteCriticalSection
(
&
X11DRV_CritSection
);
DeleteCriticalSection
(
&
X11DRV_CritSection
);
...
...
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