diff options
author | Christian Cunningham <cc@localhost> | 2021-12-23 19:15:30 -0800 |
---|---|---|
committer | Christian Cunningham <cc@localhost> | 2021-12-23 19:15:30 -0800 |
commit | a905c499ceddc47a5fcd46f863e453919c196722 (patch) | |
tree | 87373dcae97da03ce1afdf2743c2d0affae0f433 /src | |
parent | e8b09e02a8326e9d75cab97dfef4ab17ad1d6c1e (diff) |
Fixed Logic
Diffstat (limited to 'src')
-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 */ |