summaryrefslogtreecommitdiffstats
path: root/video/out/vo_x11.c
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/vo_x11.c')
-rw-r--r--video/out/vo_x11.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index a2c8ecb2e8..be385ac621 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -40,7 +40,7 @@
#include "x11_common.h"
-#ifdef HAVE_SHM
+#if HAVE_SHM
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
@@ -94,7 +94,7 @@ struct priv {
int num_buffers;
int Shmem_Flag;
-#ifdef HAVE_SHM
+#if HAVE_SHM
int Shm_Warned_Slow;
XShmSegmentInfo Shminfo[2];
@@ -157,7 +157,7 @@ static int find_depth_from_visuals(struct vo *vo, Visual ** visual_return)
static void getMyXImage(struct priv *p, int foo)
{
struct vo *vo = p->vo;
-#ifdef HAVE_SHM
+#if HAVE_SHM
if (vo->x11->display_is_local && XShmQueryExtension(vo->x11->display)) {
p->Shmem_Flag = 1;
vo->x11->ShmCompletionEvent = XShmGetEventBase(vo->x11->display)
@@ -221,7 +221,7 @@ shmemerror:
memset(p->myximage[foo]->data, 0, p->myximage[foo]->bytes_per_line
* p->image_height);
p->ImageData[foo] = p->myximage[foo]->data;
-#ifdef HAVE_SHM
+#if HAVE_SHM
}
#endif
}
@@ -229,7 +229,7 @@ shmemerror:
static void freeMyXImage(struct priv *p, int foo)
{
struct vo *vo = p->vo;
-#ifdef HAVE_SHM
+#if HAVE_SHM
if (p->Shmem_Flag) {
XShmDetach(vo->x11->display, &p->Shminfo[foo]);
XDestroyImage(p->myximage[foo]);
@@ -397,7 +397,7 @@ static void Display_Image(struct priv *p, XImage *myximage)
XImage *x_image = p->myximage[p->current_buf];
-#ifdef HAVE_SHM
+#if HAVE_SHM
if (p->Shmem_Flag) {
XShmPutImage(vo->x11->display, vo->x11->window, vo->x11->vo_gc, x_image,
0, 0, p->dst.x0, p->dst.y0, p->dst_w, p->dst_h,
@@ -443,7 +443,7 @@ static mp_image_t *get_screenshot(struct vo *vo)
static void wait_for_completion(struct vo *vo, int max_outstanding)
{
-#ifdef HAVE_SHM
+#if HAVE_SHM
struct priv *ctx = vo->priv;
struct vo_x11_state *x11 = vo->x11;
if (ctx->Shmem_Flag) {