X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fcommon%2Fmenu_pico.c;fp=platform%2Fcommon%2Fmenu_pico.c;h=7b0cd78c8efb1fe45449e30a1e6f2d9beccf3ca3;hb=2d2e57b2cf580eeea067c667183f8354d75b0238;hp=ab91e1c25d4bafb07b9cbe8cbbcead23d0e3206b;hpb=0a0073dc9fae7d867d737623d30917cc4b285b16;p=picodrive.git diff --git a/platform/common/menu_pico.c b/platform/common/menu_pico.c index ab91e1c..7b0cd78 100644 --- a/platform/common/menu_pico.c +++ b/platform/common/menu_pico.c @@ -73,6 +73,7 @@ static void make_bg(int no_scale) { unsigned short *src = (void *)g_menubg_src_ptr; int w = g_screen_width, h = g_screen_height; + int pp = g_screen_ppitch; short *dst; int x, y; @@ -87,7 +88,7 @@ static void make_bg(int no_scale) d += (g_menuscreen_h / 2 - h * 2 / 2) * g_menuscreen_w / 2; d += (g_menuscreen_w / 2 - w * 2 / 2) / 2; - for (y = 0; y < h; y++, src += w, d += g_menuscreen_w*2/2) { + for (y = 0; y < h; y++, src += pp, d += g_menuscreen_w*2/2) { for (x = 0; x < w; x++) { t = src[x]; t = ((t & 0xf79e)>>1) - ((t & 0xc618)>>3); @@ -107,7 +108,7 @@ static void make_bg(int no_scale) (g_menuscreen_w / 2 - w / 2); // darken the active framebuffer - for (; h > 0; dst += g_menuscreen_w, src += g_screen_ppitch, h--) + for (; h > 0; dst += g_menuscreen_w, src += pp, h--) menu_darken_bg(dst, src, w, 1); }