aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2012-11-12 18:49:47 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2012-11-12 18:49:47 +1000
commit67ae847970aee780fb28580bd17233df5f5bb3b2 (patch)
tree368eeab239b543745f205e9f8b21a3e5ce9186a8 /drivers
parent1c5ca344e85f23b84ce7cfd4e4ea8630f9c44c82 (diff)
downloaduGFX-67ae847970aee780fb28580bd17233df5f5bb3b2.tar.gz
uGFX-67ae847970aee780fb28580bd17233df5f5bb3b2.tar.bz2
uGFX-67ae847970aee780fb28580bd17233df5f5bb3b2.zip
Win32 orientation & gwin console line clear fixes
Fixes to Win32 orientation for scrolling Improve the way line clearing is handled in gwin consoles.
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gdisp/Win32/gdisp_lld.c56
-rw-r--r--drivers/touchscreen/MCU/.touchscreen_lld_config.h.swpbin12288 -> 0 bytes
2 files changed, 31 insertions, 25 deletions
diff --git a/drivers/gdisp/Win32/gdisp_lld.c b/drivers/gdisp/Win32/gdisp_lld.c
index 560a5f20..8aff8efc 100644
--- a/drivers/gdisp/Win32/gdisp_lld.c
+++ b/drivers/gdisp/Win32/gdisp_lld.c
@@ -709,7 +709,7 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
* @notapi
*/
void GDISP_LLD(verticalscroll)(coord_t x, coord_t y, coord_t cx, coord_t cy, int lines, color_t bgcolor) {
- RECT rect, frect;
+ RECT rect, frect, srect;
HBRUSH hbr;
#if GDISP_NEED_VALIDATION || GDISP_NEED_CLIP
@@ -748,17 +748,19 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
rect.right = GDISP.Width - x;
rect.left = rect.right-cx;
vertical_scroll:
- if (cy >= lines && cy >= -lines)
- ScrollDC(dcBuffer, 0, lines, &rect, 0, 0, 0);
- frect.left = rect.left;
- frect.right = rect.right;
+ srect.left = frect.left = rect.left;
+ srect.right = frect.right = rect.right;
if (lines > 0) {
- frect.top = rect.top;
- frect.bottom = frect.top+lines;
+ srect.top = frect.top = rect.top;
+ frect.bottom = rect.top+lines;
+ srect.bottom = rect.bottom-lines;
} else {
- frect.bottom = rect.bottom;
- frect.top = frect.bottom+lines;
+ srect.bottom = frect.bottom = rect.bottom;
+ frect.top = rect.bottom+lines;
+ srect.top = rect.top-lines;
}
+ if (cy >= lines && cy >= -lines)
+ ScrollDC(dcBuffer, 0, lines, &srect, 0, 0, 0);
break;
case GDISP_ROTATE_270:
rect.bottom = GDISP.Width - x;
@@ -767,17 +769,19 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
rect.right = rect.left+cy;
lines = -lines;
horizontal_scroll:
- if (cy >= lines && cy >= -lines)
- ScrollDC(dcBuffer, lines, 0, &rect, 0, 0, 0);
- frect.top = rect.top;
- frect.bottom = rect.bottom;
+ srect.top = frect.top = rect.top;
+ srect.bottom = frect.bottom = rect.bottom;
if (lines > 0) {
- frect.left = rect.left;
- frect.right = frect.left+lines;
+ srect.left = frect.left = rect.left;
+ frect.right = rect.left+lines;
+ srect.right = rect.right-lines;
} else {
- frect.right = rect.right;
- frect.left = frect.right+lines;
+ srect.right = frect.right = rect.right;
+ frect.left = rect.right+lines;
+ srect.left = rect.left-lines;
}
+ if (cy >= lines && cy >= -lines)
+ ScrollDC(dcBuffer, lines, 0, &srect, 0, 0, 0);
break;
}
#else
@@ -786,17 +790,19 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
rect.left = x;
rect.right = rect.left+cx;
lines = -lines;
- if (cy >= lines && cy >= -lines)
- ScrollDC(dcBuffer, 0, lines, &rect, 0, 0, 0);
- frect.left = rect.left;
- frect.right = rect.right;
+ srect.left = frect.left = rect.left;
+ srect.right = frect.right = rect.right;
if (lines > 0) {
- frect.top = rect.top;
- frect.bottom = frect.top+lines;
+ srect.top = frect.top = rect.top;
+ frect.bottom = rect.top+lines;
+ srect.bottom = rect.bottom-lines;
} else {
- frect.bottom = rect.bottom;
- frect.top = frect.bottom+lines;
+ srect.bottom = frect.bottom = rect.bottom;
+ frect.top = rect.bottom+lines;
+ srect.top = rect.top-lines;
}
+ if (cy >= lines && cy >= -lines)
+ ScrollDC(dcBuffer, 0, lines, &srect, 0, 0, 0);
#endif
if (hbr)
diff --git a/drivers/touchscreen/MCU/.touchscreen_lld_config.h.swp b/drivers/touchscreen/MCU/.touchscreen_lld_config.h.swp
deleted file mode 100644
index 595c456f..00000000
--- a/drivers/touchscreen/MCU/.touchscreen_lld_config.h.swp
+++ /dev/null
Binary files differ