rayzor
diff src/gfx.c @ 6:a68dbf80d547
finally showing something ... :)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 07 Apr 2014 06:04:11 +0300 |
parents | 5fcf72837b69 |
children |
line diff
1.1 --- a/src/gfx.c Sun Apr 06 02:43:24 2014 +0300 1.2 +++ b/src/gfx.c Mon Apr 07 06:04:11 2014 +0300 1.3 @@ -5,6 +5,7 @@ 1.4 #include <stdlib.h> 1.5 #include <string.h> 1.6 #include "vbe.h" 1.7 +#include "logger.h" 1.8 1.9 #define REALPTR(s, o) (void*)(((uint32_t)(s) << 4) + (uint32_t)(o)) 1.10 #define VBEPTR(x) REALPTR(((x) & 0xffff0000) >> 16, (x) & 0xffff) 1.11 @@ -33,15 +34,15 @@ 1.12 return 0; 1.13 } 1.14 1.15 - printf("VBE Version: %x.%x\n", vbe_info->version >> 8, vbe_info->version & 0xff); 1.16 + printlog("VBE Version: %x.%x\n", vbe_info->version >> 8, vbe_info->version & 0xff); 1.17 if(vbe_info->version < 0x200) { 1.18 fprintf(stderr, "This program requires VBE 2.0 or greater. Try running UniVBE\n"); 1.19 return 0; 1.20 } 1.21 1.22 - printf("Graphics adapter: %s, %s (%s)\n", VBEPTR(vbe_info->oem_vendor_name_ptr), 1.23 + printlog("Graphics adapter: %s, %s (%s)\n", VBEPTR(vbe_info->oem_vendor_name_ptr), 1.24 VBEPTR(vbe_info->oem_product_name_ptr), VBEPTR(vbe_info->oem_product_rev_ptr)); 1.25 - printf("Video memory: %dmb\n", vbe_info->total_mem << 6); 1.26 + printlog("Video memory: %dmb\n", vbe_info->total_mem << 6); 1.27 1.28 modes = VBEPTR(vbe_info->vid_mode_ptr); 1.29 } 1.30 @@ -75,7 +76,7 @@ 1.31 /* attempt to set 8 bits of color per component in palettized modes */ 1.32 if(bpp <= 8) { 1.33 pal_bits = vbe_set_palette_bits(8); 1.34 - printf("palette bits per color primary: %d\n", pal_bits); 1.35 + printlog("palette bits per color primary: %d\n", pal_bits); 1.36 } 1.37 1.38 fbsize = xsz * ysz * mode_info->num_img_pages * (bpp / CHAR_BIT);