aboutsummaryrefslogtreecommitdiff
path: root/host/main.c
diff options
context:
space:
mode:
authorjaseg <jaseg@jaseg.net>2014-02-17 00:57:47 +0100
committerjaseg <jaseg@jaseg.net>2014-02-17 00:57:47 +0100
commit18fd12e916c8a33007a8ccd305d280493e8cd27d (patch)
tree4b06ce599c6a5129f6c08b234679bac7b3da3cfc /host/main.c
parenta1c175138dbcdbf4aa2bc43a41855e2b2832ba63 (diff)
downloadmatelight-18fd12e916c8a33007a8ccd305d280493e8cd27d.tar.gz
matelight-18fd12e916c8a33007a8ccd305d280493e8cd27d.tar.bz2
matelight-18fd12e916c8a33007a8ccd305d280493e8cd27d.zip
ctypes pointer narf working now
Diffstat (limited to 'host/main.c')
-rw-r--r--host/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/host/main.c b/host/main.c
index c6086e1..fbe126a 100644
--- a/host/main.c
+++ b/host/main.c
@@ -20,6 +20,7 @@
void free_framebuffer(framebuffer_t *fb){
+ printf("Freeing %lx and %lx\n", fb->data, fb);
free(fb->data);
free(fb);
}
@@ -78,6 +79,7 @@ framebuffer_t *framebuffer_render_text(char *s, glyphtable_t *glyph_table){
if(g->height > gbufheight)
gbufheight = g->height;
+
gbufwidth += g->width;
}
/* For easier rendering on the terminal, round up to multiples of two */
@@ -301,6 +303,7 @@ framebuffer_t *framebuffer_render_text(char *s, glyphtable_t *glyph_table){
fb->w = gbufwidth;
fb->h = gbufheight;
fb->data = gbuf;
+ printf("Returning buffer with w %ld h %ld memory location %lx\n", gbufwidth, gbufheight, gbuf);
return fb;
error:
free(gbuf);
@@ -354,5 +357,6 @@ void console_render_buffer(framebuffer_t *fb){
}
printf("\n");
}
+ printf("\033[0m");
}