diff options
-rw-r--r-- | src/graphics/drawer.c | 6 | ||||
-rw-r--r-- | src/graphics/lfb.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/graphics/drawer.c b/src/graphics/drawer.c index 542c04c..be7b0ac 100644 --- a/src/graphics/drawer.c +++ b/src/graphics/drawer.c @@ -12,7 +12,7 @@ void write_cchar(struct Drawer* d, char s, unsigned int c) { d->x = 0; } else { draw_cletter(d->x++, d->y, s, c); - if (d->x > GG_MAX_X) { + if (d->x >= GG_MAX_X) { d->y += 1; d->x = 0; } @@ -35,7 +35,7 @@ void write_cstring(struct Drawer* d, char* s, unsigned int c) { idx++; } else { draw_cletter(d->x++, d->y, s[idx++], c); - if (d->x > GG_MAX_X) { + if (d->x >= GG_MAX_X) { d->y += 1; d->x = 0; } @@ -56,7 +56,7 @@ void set_drawer(struct Drawer* d, unsigned int x, unsigned int y) { void write_chex32(struct Drawer* d, unsigned long val, unsigned int c) { draw_chex32(d->x, d->y, val, c); d->x += 8; - if (d->x > GG_MAX_X) { + if (d->x >= GG_MAX_X) { d->y += 1; d->x %= GG_MAX_X; } diff --git a/src/graphics/lfb.h b/src/graphics/lfb.h index 2361ec4..37914ac 100644 --- a/src/graphics/lfb.h +++ b/src/graphics/lfb.h @@ -2,7 +2,7 @@ #define GRAPHICS_LFB_H #define GG_MAX_X 128 -#define GG_MAX_Y 96 +#define GG_MAX_Y 46 #ifndef GRAPHICS_LFB_C extern unsigned int width, height, pitch, isrgb; /* dimensions and channel order */ |