freebsd-ports/multimedia/libdv/files/patch-playdv:display.c
Mario Sergio Fujikawa Ferreira fac20d5893 o Add missing USE_XLIB
o Really have SDL support unless WITHOUT_SDL
o Add patch-playdv:display.h to support SDL
o Improve patch-playdv:display.c from PR
o Install additional documentation unless NOPORTDOCS (not from PR)

PR:		31732
Submitted by:	Matthew Reimer <mreimer@vpop.net>
2001-11-21 06:06:46 +00:00

44 lines
1.1 KiB
C

--- playdv/display.c.orig Wed Nov 21 03:47:29 2001
+++ playdv/display.c Wed Nov 21 03:51:04 2001
@@ -47,6 +47,8 @@
#include <popt.h>
#endif
+dv_display_t *dv_dpy_on_exit_hack = NULL;
+
static int dv_display_SDL_init(dv_display_t *dv_dpy, gchar *w_name, gchar *i_name );
static gboolean dv_display_gdk_init(dv_display_t *dv_dpy, gint *argc, gchar ***argv );
@@ -257,6 +259,7 @@
} /* switch */
free(dv_dpy);
+ dv_dpy_on_exit_hack = NULL;
} /* dv_display_exit */
static gboolean
@@ -675,6 +678,13 @@
} /* if */
} /* dv_display_exit_handler */
+static void
+dv_display_on_exit_hack_handler()
+{
+ if(dv_dpy_on_exit_hack != NULL) {
+ dv_display_exit(dv_dpy_on_exit_hack);
+ } /* if */
+} /* dv_display_exit_handler */
gboolean
dv_display_init(dv_display_t *dv_dpy, gint *argc, gchar ***argv, gint width, gint height,
@@ -804,7 +814,8 @@
fprintf(stderr, " Using gtk for display\n");
ok:
- on_exit(dv_display_exit_handler, dv_dpy);
+ dv_dpy_on_exit_hack = dv_dpy;
+ atexit(dv_display_on_exit_hack_handler);
return(TRUE);
fail: