You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by gn...@apache.org on 2020/02/10 14:57:40 UTC

[incubator-nuttx] 02/05: arch/sim: Pass X11 related config to host environment

This is an automated email from the ASF dual-hosted git repository.

gnutt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit 978575d79add1c8947c17c4e2800bf3d4f037446
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Mon Feb 10 12:55:10 2020 +0800

    arch/sim: Pass X11 related config to host environment
    
    Remove the hard code CONFIG_SIM_X11NOSHM value from up_x11framebuffer.c
---
 arch/sim/src/Makefile                | 5 +++++
 arch/sim/src/sim/up_x11framebuffer.c | 2 --
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/sim/src/Makefile b/arch/sim/src/Makefile
index 3ea0c70..8cc91ff 100644
--- a/arch/sim/src/Makefile
+++ b/arch/sim/src/Makefile
@@ -126,15 +126,20 @@ ifeq ($(CONFIG_NX_LCDDRIVER),y)
 else
   CSRCS += up_framebuffer.c
 ifeq ($(CONFIG_SIM_X11FB),y)
+ifeq ($(CONFIG_SIM_X11NOSHM),y)
+  HOSTCFLAGS += -DCONFIG_SIM_X11NOSHM=1
+endif
   HOSTSRCS += up_x11framebuffer.c
   STDLIBS += -lX11 -lXext
 ifeq ($(CONFIG_SIM_TOUCHSCREEN),y)
   CSRCS += up_touchscreen.c
   REQUIREDOBJS += up_touchscreen$(OBJEXT)
+  HOSTCFLAGS += -DCONFIG_SIM_TOUCHSCREEN=1
   HOSTSRCS += up_x11eventloop.c
 else
 ifeq ($(CONFIG_SIM_AJOYSTICK),y)
   CSRCS += up_ajoystick.c
+  HOSTCFLAGS += -DCONFIG_SIM_AJOYSTICK=1
   HOSTSRCS += up_x11eventloop.c
 endif
 endif
diff --git a/arch/sim/src/sim/up_x11framebuffer.c b/arch/sim/src/sim/up_x11framebuffer.c
index 7065a94..8704a85 100644
--- a/arch/sim/src/sim/up_x11framebuffer.c
+++ b/arch/sim/src/sim/up_x11framebuffer.c
@@ -37,8 +37,6 @@
  * Included Files
  ****************************************************************************/
 
-#define CONFIG_SIM_X11NOSHM 1
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>