diff --git a/dtool/Config.pp b/dtool/Config.pp index dccf5cd0f9..d1398eb5e3 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -690,6 +690,13 @@ #define X11_LIBS X11 #defer HAVE_X11 $[and $[IS_LINUX],$[libtest $[X11_LPATH],$[X11_LIBS]]] +// This defines if we have XF86DGA installed. This enables smooth +// FPS-style mouse in glxdisplay, when mouse mode M_relative is used. +#define XF86DGA_IPATH /usr/include/X11/extensions +#define XF86DGA_LPATH /usr/lib +#define XF86DGA_LIBS Xxf86dga +#defer HAVE_XF86DGA $[libtest $[XF86DGA_LPATH],$[XF86DGA_LIBS]] + // How about GLX? #define GLX_IPATH #define GLX_LPATH diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 5b782a3166..84f868d8a4 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -146,7 +146,11 @@ //#print - Did not find SDL //#endif #if $[HAVE_X11] +#if $[HAVE_XF86DGA] +#print + X11, with XFree86-DGA +#else #print + X11 +#endif #else #print - Did not find X11 #endif @@ -382,6 +386,9 @@ $[cdefine HAVE_SDL] /* Define if we have X11. */ $[cdefine HAVE_X11] +/* Define if we have the XFree86-DGA extension. */ +$[cdefine HAVE_XF86DGA] + /* Define if we want to compile the threading code. */ $[cdefine HAVE_THREADS] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 341aad7613..a7f70b40a0 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -143,6 +143,13 @@ #define x11_framework $[X11_FRAMEWORK] #endif +#if $[HAVE_XF86DGA] + #define xf86dga_ipath $[wildcard $[XF86DGA_IPATH]] + #define xf86dga_lpath $[wildcard $[XF86DGA_LPATH]] + #define xf86dga_cflags $[XF86DGA_CFLAGS] + #define xf86dga_libs $[XF86DGA_LIBS] +#endif + #if $[HAVE_MESA] #define mesa_ipath $[wildcard $[MESA_IPATH]] #define mesa_lpath $[wildcard $[MESA_LPATH]]