[prev in list] [next in list] [prev in thread] [next in thread]
List: bochs-cvs
Subject: [Bochs-cvs] [13559] trunk/bochs
From: vruppert--- via Bochs-cvs <bochs-cvs () lists ! sourceforge ! net>
Date: 2019-04-21 20:08:34
Message-ID: 1555877315.26003.1416 () sfp-scm-5 ! v30 ! lw ! sourceforge ! com
[Download RAW message or body]
Revision: 13559
Author: vruppert
Date: 2019-04-21 20:08:32 +0000 (Sun, 21 Apr 2019)
Log Message:
-----------
Check if Xrandr extension is present.
Modified Paths:
--------------
trunk/bochs/config.h.in
trunk/bochs/configure
trunk/bochs/configure.in
trunk/bochs/gui/x.cc
Modified: trunk/bochs/config.h.in
===================================================================
--- trunk/bochs/config.h.in 2019-04-17 16:04:34 UTC (rev 13558)
+++ trunk/bochs/config.h.in 2019-04-21 20:08:32 UTC (rev 13559)
@@ -128,6 +128,7 @@
#define BX_HAVE_MKSTEMP 0
#define BX_HAVE_SYS_MMAN_H 0
#define BX_HAVE_XPM_H 0
+#define BX_HAVE_XRANDR_H 0
#define BX_HAVE_TIMELOCAL 0
#define BX_HAVE_GMTIME 0
#define BX_HAVE_MKTIME 0
Modified: trunk/bochs/configure
===================================================================
(Binary files differ)
Modified: trunk/bochs/configure.in
===================================================================
--- trunk/bochs/configure.in 2019-04-17 16:04:34 UTC (rev 13558)
+++ trunk/bochs/configure.in 2019-04-21 20:08:32 UTC (rev 13559)
@@ -2328,6 +2328,7 @@
# handled later.
XPM_LIB=''
+XRANDR_LIB=''
if test "$with_x11" = yes; then
display_libs="$display_libs X11"
if test "$no_x" = yes; then
@@ -2358,12 +2359,16 @@
XPM_LIB='-lXpm'
])
fi
+ AC_CHECK_HEADER(X11/extensions/Xrandr.h, [
+ AC_DEFINE(BX_HAVE_XRANDR_H)
+ XRANDR_LIB='-lXrandr'
+ ])
if test "$PKGCONFIG" != not_found; then
X_CFLAGS="`pkg-config --cflags x11`"
- X_LIBS="`pkg-config --libs x11` $XPM_LIB -lXrandr"
+ X_LIBS="`pkg-config --libs x11` $XPM_LIB $XRANDR_LIB"
else
- X_LIBS="$X_LIBS -lX11 $XPM_LIB -lXrandr"
+ X_LIBS="$X_LIBS -lX11 $XPM_LIB $XRANDR_LIB"
fi
AC_DEFINE(BX_WITH_X11, 1)
Modified: trunk/bochs/gui/x.cc
===================================================================
--- trunk/bochs/gui/x.cc 2019-04-17 16:04:34 UTC (rev 13558)
+++ trunk/bochs/gui/x.cc 2019-04-21 20:08:32 UTC (rev 13559)
@@ -39,7 +39,9 @@
#include <X11/Xos.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>
+#if BX_HAVE_XRANDR_H
#include <X11/extensions/Xrandr.h>
+#endif
#if BX_HAVE_XPM_H
#include <X11/xpm.h>
#endif
@@ -60,7 +62,9 @@
DECLARE_GUI_NEW_VIRTUAL_METHODS()
virtual void beep_on(float frequency);
virtual void beep_off();
+#if BX_HAVE_XRANDR_H
virtual void get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp);
+#endif
virtual void set_display_mode(disp_mode_t newmode);
virtual void set_mouse_mode_absxy(bx_bool mode);
#if BX_SHOW_IPS
@@ -1800,6 +1804,7 @@
BX_INFO(("X11 Beep OFF"));
}
+#if BX_HAVE_XRANDR_H
void bx_x_gui_c::get_capabilities(Bit16u *xres, Bit16u *yres, Bit16u *bpp)
{
int num_sizes;
@@ -1829,6 +1834,7 @@
// always return 32 bit depth
*bpp = 32;
}
+#endif
void bx_x_gui_c::set_display_mode(disp_mode_t newmode)
{
_______________________________________________
Bochs-cvs mailing list
Bochs-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bochs-cvs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic