// draws text to current bbp16 screen\r
static void text_out16_(int x, int y, const char *text, int color)\r
{\r
- int i, l, u, tr, tg, tb, len;\r
+ int i, lh, tr, tg, tb, len;\r
unsigned short *dest = (unsigned short *)g_screen_ptr + x + y * g_screen_width;\r
tr = (color & 0xf800) >> 8;\r
tg = (color & 0x07e0) >> 3;\r
len = p - text;\r
}\r
\r
+ lh = me_mfont_h;\r
+ if (y + lh > g_screen_height)\r
+ lh = g_screen_height - y;\r
+\r
for (i = 0; i < len; i++)\r
{\r
unsigned char *src = menu_font_data + (unsigned int)text[i] * me_mfont_w * me_mfont_h / 2;\r
unsigned short *dst = dest;\r
- for (l = 0; l < me_mfont_h; l++, dst += g_screen_width - me_mfont_w)\r
+ int u, l;\r
+\r
+ for (l = 0; l < lh; l++, dst += g_screen_width - me_mfont_w)\r
{\r
for (u = me_mfont_w / 2; u > 0; u--, src++)\r
{\r
fbvar_new.yoffset = fbvar_old.yres * draw_buf;
g_screen_ptr = fbdev_buffers[fbdev_buffer_write];
+
+ ioctl(fbdev, FBIOPAN_DISPLAY, &fbvar_new);
}
void plat_video_wait_vsync(void)