Skip to content

Commit c8ddf45

Browse files
committed
gfxlib2/darwin: disable cocoa when DISABLE_X11 is unset
1 parent d9e8fb8 commit c8ddf45

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/gfxlib2/unix/fb_gfx_x11.h

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#ifndef __FB_GFX_X11_H__
66
#define __FB_GFX_X11_H__
77

8+
#define NARROWPROTO
89
#include <X11/Xlib.h>
910
#include <X11/Xutil.h>
1011
#include <X11/xpm.h>

src/gfxlib2/unix/gfx_unix.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#if defined HOST_FREEBSD || defined HOST_OPENBSD || defined HOST_LINUX || defined HOST_DARWIN || defined HOST_SOLARIS || defined HOST_DRAGONFLY || defined HOST_NETBSD
1616

1717
const GFXDRIVER *__fb_gfx_drivers_list[] = {
18-
#if defined HOST_DARWIN && !defined DISABLE_OPENGL
18+
#if defined HOST_DARWIN && !defined DISABLE_OPENGL && defined DISABLE_X11
1919
&fb_gfxDriverCocoaOpenGL,
2020
#endif
2121

@@ -41,7 +41,7 @@ void fb_hScreenInfo(ssize_t *width, ssize_t *height, ssize_t *depth, ssize_t *re
4141
#if defined HOST_LINUX && !defined DISABLE_FBDEV
4242
if (fb_hFBDevInfo(width, height, depth, refresh))
4343
#endif
44-
#if defined HOST_DARWIN
44+
#if defined HOST_DARWIN && DISABLE_X11
4545
if (fb_hCocoaScreenInfo(width, height, depth, refresh))
4646
#endif
4747
*width = *height = *depth = *refresh = 0;

0 commit comments

Comments
 (0)