From 75fbf8837e509b76d1489d0be4c3471d718cc352 Mon Sep 17 00:00:00 2001 From: arighi Date: Mon, 22 Mar 2010 17:39:08 +0000 Subject: [PATCH] demo: wait for a keypress event instead of sleeping for a second in hello_world() test. This allows to correctly process GUI events during the hello_world() test in the emulated demo. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3261 38d2e660-2303-0410-9eaa-f027e97ec537 --- examples/demo/demo.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/demo/demo.c b/examples/demo/demo.c index 0dbce6e9..de9ddeb0 100644 --- a/examples/demo/demo.c +++ b/examples/demo/demo.c @@ -95,8 +95,9 @@ static void hello_world(Bitmap *bm) text_xprintf(bm, 1, 0, STYLEF_BOLD | TEXT_FILL | TEXT_CENTER, "Hello, world!"); schedule(); - - timer_delay(1000); + while (1) + if (kbd_peek()) + break; /* Restore old font */ gfx_setFont(bm, old_font); -- 2.25.1