X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=platform%2Fgp2x%2Fmenu.c;h=aa3019f6704e400e90555e32e8fa48fd5c1832cd;hb=0a051f558c6585c94d06dbe670e70bcac4e0aadd;hp=40eee48b29bd31b02294f49b2894889082ee9b43;hpb=83bd0b76aba19ff62368cfee76089e15579e3b7c;p=picodrive.git diff --git a/platform/gp2x/menu.c b/platform/gp2x/menu.c index 40eee48..aa3019f 100644 --- a/platform/gp2x/menu.c +++ b/platform/gp2x/menu.c @@ -729,6 +729,10 @@ static void kc_sel_loop(void) static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_jp) { int tl_x = 25, tl_y = 60, y; + char ra_buff[16]; + + if (PicoCDBuffers > 1) sprintf(ra_buff, "%5iK", PicoCDBuffers * 2); + else strcpy(ra_buff, " OFF"); y = tl_y; //memset(gp2x_screen, 0, 320*240); @@ -741,6 +745,7 @@ static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_j gp2x_text_out8(tl_x, (y+=10), "CDDA audio (using mp3s) %s", (currentConfig.PicoOpt&0x0800)?"ON":"OFF"); // 4 gp2x_text_out8(tl_x, (y+=10), "PCM audio %s", (currentConfig.PicoOpt&0x0400)?"ON":"OFF"); // 5 gp2x_text_out8(tl_x, (y+=10), "Better sync (very slow) %s", (currentConfig.PicoOpt&0x2000)?"ON":"OFF"); // 6 + gp2x_text_out8(tl_x, (y+=10), "ReadAhead buffer %s", ra_buff); // 7 gp2x_text_out8(tl_x, (y+=10), "Done"); // draw cursor @@ -756,7 +761,7 @@ static void draw_cd_menu_options(int menu_sel, char *b_us, char *b_eu, char *b_j static void cd_menu_loop_options(void) { - int menu_sel = 0, menu_sel_max = 7; + int menu_sel = 0, menu_sel_max = 8; unsigned long inp = 0; char bios_us[32], bios_eu[32], bios_jp[32], *bios, *p; @@ -787,7 +792,17 @@ static void cd_menu_loop_options(void) case 4: currentConfig.PicoOpt^=0x0800; break; case 5: currentConfig.PicoOpt^=0x0400; break; case 6: currentConfig.PicoOpt^=0x2000; break; - case 7: return; + case 7: + if (inp & GP2X_LEFT) { + PicoCDBuffers >>= 1; + if (PicoCDBuffers < 64) PicoCDBuffers = 0; + } else { + if (PicoCDBuffers < 64) PicoCDBuffers = 64; + else PicoCDBuffers <<= 1; + if (PicoCDBuffers > 4096) PicoCDBuffers = 4096; + } + break; + case 8: return; } } if(inp & (GP2X_X|GP2X_A)) return;