Made centering of bootlogo work and removed contraproductiv setScale2x2() in dogm_lcd_implementation.h

master
AnHardt 10 years ago
parent 0d219b3e14
commit aa48056c03

@ -117,18 +117,13 @@ static void lcd_implementation_init()
} while(u8g.nextPage());
// Show splashscreen
int off = (u8g.getWidth() - START_BMPWIDTH) / 2;
int offx = (u8g.getWidth() - START_BMPWIDTH) / 2;
int offy = (u8g.getHeight() - 18 - START_BMPHEIGHT) / 2;
int txtX = (u8g.getWidth() - (sizeof(STRING_SPLASH) - 1)*5) / 2; // 5 is fontwidth in pixel
int txtY = u8g.getHeight() - 10;
u8g.firstPage();
do {
#ifdef START_BMPHIGH
u8g.drawBitmapP(off, off, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
#else
u8g.setScale2x2();
u8g.drawBitmapP(off, off, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
u8g.undoScale();
#endif
u8g.drawBitmapP(offx, offy, START_BMPBYTEWIDTH, START_BMPHEIGHT, start_bmp);
u8g.setFont(u8g_font_5x8);
u8g.drawStr(txtX, txtY, STRING_SPLASH);

Loading…
Cancel
Save