1.1 --- a/pkg/landfall-examples/input_event_client/input_event_client.cc Fri May 18 17:42:56 2018 +0200
1.2 +++ b/pkg/landfall-examples/input_event_client/input_event_client.cc Fri May 18 18:43:30 2018 +0200
1.3 @@ -153,9 +153,12 @@
1.4 if (!priv)
1.5 {
1.6 for (column = 0, mask = (1 << 9); column < 10; column++, mask >>= 1)
1.7 - _screen->draw_box(Rect(Point(column * colsize, row * rowsize), Area(colsize, rowsize)),
1.8 - event.payload.code & mask ? event.payload.value ? Rgb32::Color(0, 255, 0) : Rgb32::Color(255, 0, 0)
1.9 - : Rgb32::Color(0, 0, 0));
1.10 + _screen->draw_box(Rect(Point(column * colsize, row * rowsize),
1.11 + Area(colsize, rowsize)),
1.12 + event.payload.code & mask ? (
1.13 + event.payload.value ? Rgb32::Color(0, 255, 0)
1.14 + : Rgb32::Color(255, 0, 0))
1.15 + : Rgb32::Color(0, 0, 0));
1.16
1.17 /* Advance to the next row, wrapping around. */
1.18
1.19 @@ -200,6 +203,10 @@
1.20 text_x = 0;
1.21 text_y = 0;
1.22 next_y = box.h();
1.23 +
1.24 + /* Clear the screen. */
1.25 +
1.26 + _screen->draw_box(Rect(Point(0, 0), Area(view_info.width, view_info.height)), Rgb32::Color(0, 0, 0));
1.27 }
1.28
1.29 Point p(text_x, text_y);