diff --git a/Makefile b/Makefile index fece0c8ef1..e0b571718c 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,8 @@ endif endif ifeq ($(HAVE_JACK),1) OBJ += audio/jack.o - LIBS += -ljack + LIBS += $(JACK_LIBS) + DEFINES += $(JACK_CFLAGS) endif ifeq ($(HAVE_PULSE), 1) OBJ += audio/pulse.o diff --git a/gfx/xvideo.c b/gfx/xvideo.c index f01a486f3e..0313ec25e6 100644 --- a/gfx/xvideo.c +++ b/gfx/xvideo.c @@ -30,7 +30,7 @@ #include #include -// Adapted from bSNES source. +// Adapted from bSNES and MPlayer source. typedef struct xv xv_t; struct xv @@ -61,6 +61,15 @@ struct xv void (*render_func)(xv_t*, const void *frame, unsigned width, unsigned height, unsigned pitch); }; +static void xv_set_nonblock_state(void *data, bool state) +{ + xv_t *xv = data; + Atom atom = XInternAtom(xv->display, "XV_SYNC_TO_VBLANK", true); + if (atom != None && xv->port >= 0) + XvSetPortAttribute(xv->display, xv->port, atom, !state); + else + SSNES_WARN("Failed to set SYNC_TO_VBLANK attribute.\n"); +} static volatile sig_atomic_t g_quit = false; static void sighandler(int sig) @@ -425,6 +434,8 @@ static void* xv_init(video_info_t *video, const input_driver_t **input, void **i sigaction(SIGINT, &sa, NULL); sigaction(SIGTERM, &sa, NULL); + xv_set_nonblock_state(xv, !video->vsync); + void *xinput = input_x.init(); if (xinput) { @@ -568,13 +579,6 @@ static bool xv_focus(void *data) return true; } -static void xv_set_nonblock_state(void *data, bool state) -{ - xv_t *xv = data; - Atom atom = XInternAtom(xv->display, "XV_SYNC_TO_VBLANK", true); - if (atom != None && xv->port >= 0) - XvSetPortAttribute(xv->display, xv->port, atom, !state); -} static void xv_free(void *data) { diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 9740a6038b..c161cb91cc 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -28,7 +28,7 @@ fi check_pkgconf RSOUND rsound 1.1 check_lib ROAR -lroar roar_vs_new -check_lib JACK -ljack jack_client_open +check_pkgconf JACK jack 0.120.1 check_pkgconf PULSE libpulse check_pkgconf SDL sdl 1.2.10