Closing minor memory leak in XME code.

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon
2006-10-29 02:46:42 +00:00
parent 106664a5ec
commit c2899bd3ed
3 changed files with 18 additions and 0 deletions

View File

@@ -393,3 +393,13 @@ Bool XiGMiscFullScreen(Display *dpy, int screen, XID window, XID cmap)
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;
}
}

View File

@@ -36,6 +36,10 @@ extern int XiGMiscQueryResolutions(Display *dpy, int screen, int view,
XiGMiscResolutionInfo **presolutions);
extern void XiGMiscChangeResolution(Display *dpy, int screen, int view,
int width, int height, int refresh);
/* SDL addition from Ryan: free memory used by xme. */
extern void XiGMiscDestroy(void);
#endif /* _XME_H_INCLUDED */

View File

@@ -1408,5 +1408,9 @@ void X11_VideoQuit(_THIS)
/* Direct screen access, no memory buffer */
this->screen->pixels = NULL;
}
#if SDL_VIDEO_DRIVER_X11_XME
XiGMiscDestroy();
#endif
}