Fix cellwidth calculation and some off-by-one errors (thanks to T. Jarosch).

This commit is contained in:
mmdolze
2010-10-28 20:50:16 +00:00
parent 152b68d5fe
commit 49cd060374
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ drivers_load_driver(const char *name)
display_props->width = driver->width(driver);
display_props->height = driver->height(driver);
if (driver->cellwidth != NULL && display_props->cellwidth > 0)
if (driver->cellwidth != NULL && driver->cellwidth(driver) > 0)
display_props->cellwidth = driver->cellwidth(driver);
else
display_props->cellwidth = LCD_DEFAULT_CELLWIDTH;