notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
minor psp fixes
[libpicofe.git]
/
psp
/
menu.c
diff --git
a/psp/menu.c
b/psp/menu.c
index
53d7c25
..
f8ba4d7
100644
(file)
--- a/
psp/menu.c
+++ b/
psp/menu.c
@@
-154,7
+154,7
@@
void menu_romload_prepare(const char *rom_name)
psp_video_switch_to_single();
if (rom_data) menu_draw_begin();
psp_video_switch_to_single();
if (rom_data) menu_draw_begin();
- else memset32(psp_screen, 0, 512*272*2/4);
+ else memset32
_uncached
(psp_screen, 0, 512*272*2/4);
smalltext_out16(1, 1, "Loading", 0xffff);
smalltext_out16_lim(1, 10, p, 0xffff, 80);
smalltext_out16(1, 1, "Loading", 0xffff);
smalltext_out16_lim(1, 10, p, 0xffff, 80);
@@
-453,8
+453,10
@@
static void draw_debug(void)
static void debug_menu_loop(void)
{
static void debug_menu_loop(void)
{
+ int ret = 0;
draw_debug();
draw_debug();
- wait_for_input(BTN_X|BTN_CIRCLE, 0);
+ while (!(ret & (BTN_X|BTN_CIRCLE)))
+ ret = wait_for_input(BTN_X|BTN_CIRCLE, 0);
}
// ------------ patch/gg menu ------------
}
// ------------ patch/gg menu ------------
@@
-917,17
+919,20
@@
static void cd_menu_loop_options(void)
char *bios, *p;
if (emu_findBios(4, &bios)) { // US
char *bios, *p;
if (emu_findBios(4, &bios)) { // US
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);
+ if (*p == '/') p++;
strncpy(bios_names.us, p, sizeof(bios_names.us)); bios_names.us[sizeof(bios_names.us)-1] = 0;
} else strcpy(bios_names.us, "NOT FOUND");
if (emu_findBios(8, &bios)) { // EU
strncpy(bios_names.us, p, sizeof(bios_names.us)); bios_names.us[sizeof(bios_names.us)-1] = 0;
} else strcpy(bios_names.us, "NOT FOUND");
if (emu_findBios(8, &bios)) { // EU
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);
+ if (*p == '/') p++;
strncpy(bios_names.eu, p, sizeof(bios_names.eu)); bios_names.eu[sizeof(bios_names.eu)-1] = 0;
} else strcpy(bios_names.eu, "NOT FOUND");
if (emu_findBios(1, &bios)) { // JP
strncpy(bios_names.eu, p, sizeof(bios_names.eu)); bios_names.eu[sizeof(bios_names.eu)-1] = 0;
} else strcpy(bios_names.eu, "NOT FOUND");
if (emu_findBios(1, &bios)) { // JP
- for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--); p++;
+ for (p = bios+strlen(bios)-1; p > bios && *p != '/'; p--);
+ if (*p == '/') p++;
strncpy(bios_names.jp, p, sizeof(bios_names.jp)); bios_names.jp[sizeof(bios_names.jp)-1] = 0;
} else strcpy(bios_names.jp, "NOT FOUND");
strncpy(bios_names.jp, p, sizeof(bios_names.jp)); bios_names.jp[sizeof(bios_names.jp)-1] = 0;
} else strcpy(bios_names.jp, "NOT FOUND");
@@
-936,7
+941,7
@@
static void cd_menu_loop_options(void)
for (;;)
{
draw_cd_menu_options(menu_sel, &bios_names);
for (;;)
{
draw_cd_menu_options(menu_sel, &bios_names);
- inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE, 0);
+ inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_LEFT|BTN_RIGHT|BTN_X|BTN_CIRCLE
|BTN_START
, 0);
if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
selected_id = me_index2id(cdopt_entries, CDOPT_ENTRY_COUNT, menu_sel);
if (inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
if (inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
selected_id = me_index2id(cdopt_entries, CDOPT_ENTRY_COUNT, menu_sel);
@@
-953,11
+958,12
@@
static void cd_menu_loop_options(void)
}
}
}
}
}
}
- if (inp & BTN_CIRCLE)
{
// toggleable options
+ if (inp & BTN_CIRCLE) // toggleable options
if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_CDOPT_DONE) {
return;
}
if (!me_process(cdopt_entries, CDOPT_ENTRY_COUNT, selected_id, 1) &&
selected_id == MA_CDOPT_DONE) {
return;
}
+ if (inp & BTN_START) {
switch (selected_id) { // BIOS testers
case MA_CDOPT_TESTBIOS_USA:
if (emu_findBios(4, &bios)) { // test US
switch (selected_id) { // BIOS testers
case MA_CDOPT_TESTBIOS_USA:
if (emu_findBios(4, &bios)) { // test US
@@
-1056,7
+1062,7
@@
static void menu_opt3_preview(int is_32col)
lprintf("uncompress returned %i\n", ret);
}
lprintf("uncompress returned %i\n", ret);
}
- memset32(psp_screen, 0, 512*272*2/4);
+ memset32
_uncached
(psp_screen, 0, 512*272*2/4);
emu_forcedFrame();
menu_prepare_bg(1, 0);
emu_forcedFrame();
menu_prepare_bg(1, 0);
@@
-1116,6
+1122,7
@@
static void dispmenu_loop_options(void)
if (setting != NULL) {
while ((inp = psp_pad_read(0)) & (BTN_LEFT|BTN_RIGHT)) {
*setting += (inp & BTN_LEFT) ? -0.01 : 0.01;
if (setting != NULL) {
while ((inp = psp_pad_read(0)) & (BTN_LEFT|BTN_RIGHT)) {
*setting += (inp & BTN_LEFT) ? -0.01 : 0.01;
+ if (*setting <= 0) *setting = 0.01;
menu_opt3_preview(is_32col);
draw_dispmenu_options(menu_sel); // will wait vsync
}
menu_opt3_preview(is_32col);
draw_dispmenu_options(menu_sel); // will wait vsync
}
@@
-1732,12
+1739,12
@@
static void menu_prepare_bg(int use_game_bg, int use_fg)
int i;
for (i = 272; i > 0; i--, dst += 480, src += 512)
menu_darken_bg(dst, src, 480, 1);
int i;
for (i = 272; i > 0; i--, dst += 480, src += 512)
menu_darken_bg(dst, src, 480, 1);
- //memset32((int *)(bg_buffer + 480*264), 0, 480*8*2/4);
+ //memset32
_uncached
((int *)(bg_buffer + 480*264), 0, 480*8*2/4);
}
else
{
// should really only happen once, on startup..
}
else
{
// should really only happen once, on startup..
- memset32((int *)(void *)bg_buffer, 0, sizeof(bg_buffer)/4);
+ memset32
_uncached
((int *)(void *)bg_buffer, 0, sizeof(bg_buffer)/4);
readpng(bg_buffer, "skin/background.png", READPNG_BG);
}
sceKernelDcacheWritebackAll();
readpng(bg_buffer, "skin/background.png", READPNG_BG);
}
sceKernelDcacheWritebackAll();
@@
-1811,7
+1818,7
@@
int menu_loop_tray(void)
for (;;)
{
draw_menu_tray(menu_sel);
for (;;)
{
draw_menu_tray(menu_sel);
- inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_
X
, 0);
+ inp = wait_for_input(BTN_UP|BTN_DOWN|BTN_
CIRCLE
, 0);
if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
if(inp & BTN_CIRCLE) {
if(inp & BTN_UP ) { menu_sel--; if (menu_sel < 0) menu_sel = menu_sel_max; }
if(inp & BTN_DOWN) { menu_sel++; if (menu_sel > menu_sel_max) menu_sel = 0; }
if(inp & BTN_CIRCLE) {