From e741d6045b16af2143fb325ab416992a8c0c8fd5 Mon Sep 17 00:00:00 2001 From: Andrew Hannam Date: Fri, 30 Nov 2012 00:41:43 +1000 Subject: GWIN Console Clear Fix When a GWIN Console is cleared, set the cursor back to the top left corner. --- src/gwin.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/gwin.c') diff --git a/src/gwin.c b/src/gwin.c index 87288aa9..e7bbda01 100644 --- a/src/gwin.c +++ b/src/gwin.c @@ -152,6 +152,13 @@ void gwinClear(GHandle gh) { gdispSetClip(gh->x, gh->y, gh->width, gh->height); #endif gdispFillArea(gh->x, gh->y, gh->width, gh->height, gh->bgcolor); + + #if GWIN_NEED_CONSOLE + if (gh->type == GW_CONSOLE) { + ((GConsoleObject *)gh)->cx = 0; + ((GConsoleObject *)gh)->cy = 0; + } + #endif } /** -- cgit v1.2.3