Commit 239244f8 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Closing minor memory leak in XME code.

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402209
parent fce92444
...@@ -393,3 +393,13 @@ Bool XiGMiscFullScreen(Display *dpy, int screen, XID window, XID cmap) ...@@ -393,3 +393,13 @@ Bool XiGMiscFullScreen(Display *dpy, int screen, XID window, XID cmap)
return (rep.success ? xTrue : xFalse); return (rep.success ? xTrue : xFalse);
} }
/* SDL addition from Ryan: free memory used by xme. */
void XiGMiscDestroy(void)
{
if (xigmisc_info) {
XextDestroyExtension(xigmisc_info);
xigmisc_info = NULL;
}
}
...@@ -36,6 +36,10 @@ extern int XiGMiscQueryResolutions(Display *dpy, int screen, int view, ...@@ -36,6 +36,10 @@ extern int XiGMiscQueryResolutions(Display *dpy, int screen, int view,
XiGMiscResolutionInfo **presolutions); XiGMiscResolutionInfo **presolutions);
extern void XiGMiscChangeResolution(Display *dpy, int screen, int view, extern void XiGMiscChangeResolution(Display *dpy, int screen, int view,
int width, int height, int refresh); int width, int height, int refresh);
/* SDL addition from Ryan: free memory used by xme. */
extern void XiGMiscDestroy(void);
#endif /* _XME_H_INCLUDED */ #endif /* _XME_H_INCLUDED */
...@@ -1408,5 +1408,9 @@ void X11_VideoQuit(_THIS) ...@@ -1408,5 +1408,9 @@ void X11_VideoQuit(_THIS)
/* Direct screen access, no memory buffer */ /* Direct screen access, no memory buffer */
this->screen->pixels = NULL; this->screen->pixels = NULL;
} }
#if SDL_VIDEO_DRIVER_X11_XME
XiGMiscDestroy();
#endif
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment