Closing minor memory leak in XME code.
--- a/src/video/Xext/XME/xme.c Fri Oct 27 20:18:24 2006 +0000
+++ b/src/video/Xext/XME/xme.c Sun Oct 29 02:46:42 2006 +0000
@@ -393,3 +393,13 @@
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;
+ }
+}
+
--- a/src/video/Xext/extensions/xme.h Fri Oct 27 20:18:24 2006 +0000
+++ b/src/video/Xext/extensions/xme.h Sun Oct 29 02:46:42 2006 +0000
@@ -36,6 +36,10 @@
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 */
--- a/src/video/x11/SDL_x11video.c Fri Oct 27 20:18:24 2006 +0000
+++ b/src/video/x11/SDL_x11video.c Sun Oct 29 02:46:42 2006 +0000
@@ -1408,5 +1408,9 @@
/* Direct screen access, no memory buffer */
this->screen->pixels = NULL;
}
+
+#if SDL_VIDEO_DRIVER_X11_XME
+ XiGMiscDestroy();
+#endif
}