summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim/src/up_idle.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/arch/sim/src/up_idle.c')
-rw-r--r--nuttx/arch/sim/src/up_idle.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/nuttx/arch/sim/src/up_idle.c b/nuttx/arch/sim/src/up_idle.c
index 70d25f1d6..d7397ba22 100644
--- a/nuttx/arch/sim/src/up_idle.c
+++ b/nuttx/arch/sim/src/up_idle.c
@@ -134,19 +134,24 @@ void up_idle(void)
/* Handle X11-related events */
#ifdef CONFIG_SIM_X11FB
-#ifdef CONFIG_SIM_TOUCHSCREEN
- if (g_eventloop)
+ if (g_x11initialized)
{
- up_x11events();
- }
+ /* Driver the X11 event loop */
+
+#ifdef CONFIG_SIM_TOUCHSCREEN
+ if (g_eventloop)
+ {
+ up_x11events();
+ }
#endif
- /* Update the display periodically */
+ /* Update the display periodically */
- g_x11refresh += 1000000 / CLK_TCK;
- if (g_x11refresh > 500000)
- {
- up_x11update();
+ g_x11refresh += 1000000 / CLK_TCK;
+ if (g_x11refresh > 500000)
+ {
+ up_x11update();
+ }
}
#endif
#endif