diff options
author | Toomas Soome <tsoome@me.com> | 2020-11-21 20:59:01 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-12-01 09:16:15 +0200 |
commit | 166994016fed8bc2ed47612b34708b33007a891b (patch) | |
tree | 10bcca0b475b3273038a308dea93950701947a88 | |
parent | 2699b94cd4d1e9baf6bfcbe579328b398a9736e6 (diff) | |
download | illumos-joyent-166994016fed8bc2ed47612b34708b33007a891b.tar.gz |
13331 loader: term_drawrect and putimage coordinates fix
Reviewed by: Andy Fiddaman <andy@omnios.org>
Approved by: Dan McDonald <danmcd@joyent.com>
-rw-r--r-- | usr/src/boot/Makefile.version | 2 | ||||
-rw-r--r-- | usr/src/boot/sys/boot/common/gfx_fb.c | 19 |
2 files changed, 12 insertions, 9 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version index 1d116dda12..d4000c0baf 100644 --- a/usr/src/boot/Makefile.version +++ b/usr/src/boot/Makefile.version @@ -34,4 +34,4 @@ LOADER_VERSION = 1.1 # Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes. # The version is processed from left to right, the version number can only # be increased. -BOOT_VERSION = $(LOADER_VERSION)-2020.11.25.1 +BOOT_VERSION = $(LOADER_VERSION)-2020.11.27.1 diff --git a/usr/src/boot/sys/boot/common/gfx_fb.c b/usr/src/boot/sys/boot/common/gfx_fb.c index 56314566d6..94b9c71bef 100644 --- a/usr/src/boot/sys/boot/common/gfx_fb.c +++ b/usr/src/boot/sys/boot/common/gfx_fb.c @@ -1121,14 +1121,17 @@ gfx_term_drawrect(uint32_t ux1, uint32_t uy1, uint32_t ux2, uint32_t uy2) width = vf_width / 4; /* line width */ xshift = (vf_width - width) / 2; yshift = (vf_height - width) / 2; - /* Terminal coordinates start from (1,1) */ - ux1--; - uy1--; + + /* Shift coordinates */ + if (ux1 != 0) + ux1--; + if (uy1 != 0) + uy1--; ux2--; uy2--; /* mark area used in tem */ - tem_image_display(tems.ts_active, uy1 - 1, ux1 - 1, uy2, ux2); + tem_image_display(tems.ts_active, uy1, ux1, uy2 + 1, ux2 + 1); /* * Draw horizontal lines width points thick, shifted from outer edge. @@ -1320,10 +1323,10 @@ gfx_fb_putimage(png_t *png, uint32_t ux1, uint32_t uy1, uint32_t ux2, */ if (!(flags & FL_PUTIMAGE_NOSCROLL)) { tem_image_display(tems.ts_active, - da.row / tems.ts_font.vf_height - 1, - da.col / tems.ts_font.vf_width - 1, - (da.row + da.height) / tems.ts_font.vf_height - 1, - (da.col + da.width) / tems.ts_font.vf_width - 1); + da.row / tems.ts_font.vf_height, + da.col / tems.ts_font.vf_width, + (da.row + da.height) / tems.ts_font.vf_height, + (da.col + da.width) / tems.ts_font.vf_width); } if ((flags & FL_PUTIMAGE_BORDER)) |