From 8c1534e3eda71327cfdcc20ac5f1317eb7dff044 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 22 Apr 2016 13:39:35 -0600 Subject: [PATCH] VNC: Finish initializing the VNC server once we have the NX handle --- configs/sim/src/sim_touchscreen.c | 15 +++++++++++++++ graphics/nxmu/nx_start.c | 16 ---------------- include/nuttx/video/vnc.h | 2 +- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/configs/sim/src/sim_touchscreen.c b/configs/sim/src/sim_touchscreen.c index 5187aa411f..c6afc35528 100644 --- a/configs/sim/src/sim_touchscreen.c +++ b/configs/sim/src/sim_touchscreen.c @@ -50,6 +50,10 @@ #include #include +#ifdef CONFIG_VNCSERVER +# include +#endif + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -130,6 +134,17 @@ int board_tsc_setup(int minor) goto errout_with_fb; } +#ifdef CONFIG_VNCSERVER + /* Setup the VNC server to support keyboard/mouse inputs */ + + ret = vnc_default_fbinitialize(0, g_simtc.hnx); + if (ret < 0) + { + idbg("vnc_default_fbinitialize failed: %d\n", ret); + goto errout_with_fb; + } +#endif + /* Set the background to the configured background color */ ivdbg("Set background color=%d\n", CONFIG_EXAMPLES_TOUCHSCREEN_BGCOLOR); diff --git a/graphics/nxmu/nx_start.c b/graphics/nxmu/nx_start.c index 78e98132ee..814dc5a70c 100644 --- a/graphics/nxmu/nx_start.c +++ b/graphics/nxmu/nx_start.c @@ -53,22 +53,6 @@ #ifdef CONFIG_NX_NXSTART -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/**************************************************************************** - * Private Types - ****************************************************************************/ - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -/**************************************************************************** - * Public Data - ****************************************************************************/ - /**************************************************************************** * Private Functions ****************************************************************************/ diff --git a/include/nuttx/video/vnc.h b/include/nuttx/video/vnc.h index 2dbcbd9e03..fdb1dfd4a9 100644 --- a/include/nuttx/video/vnc.h +++ b/include/nuttx/video/vnc.h @@ -180,7 +180,7 @@ void vnc_mouseout(FAR void *arg, nxgl_coord_t x, nxgl_coord_t y, * ****************************************************************************/ -/* int vnc_default_fbinitialize(nt display, NXHANDLE handle); */ +/* int vnc_default_fbinitialize(int display, NXHANDLE handle); */ #if defined(CONFIG_NX_KBD) && defined(CONFIG_NX_XYINPUT)