aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2012-11-30 00:41:43 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2012-11-30 00:41:43 +1000
commite741d6045b16af2143fb325ab416992a8c0c8fd5 (patch)
tree6bb46d3ae377fac15772466a5ec43e4f1f97b5d8
parentbc0ce072984b89a097b0d8de35422452588fac56 (diff)
downloaduGFX-e741d6045b16af2143fb325ab416992a8c0c8fd5.tar.gz
uGFX-e741d6045b16af2143fb325ab416992a8c0c8fd5.tar.bz2
uGFX-e741d6045b16af2143fb325ab416992a8c0c8fd5.zip
GWIN Console Clear Fix
When a GWIN Console is cleared, set the cursor back to the top left corner.
-rw-r--r--src/gwin.c7
1 files changed, 7 insertions, 0 deletions
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
}
/**