yamathedestroyer / procfw

Automatically exported from code.google.com/p/procfw
0 stars 0 forks source link

O Button Not Disabled in VSH #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open VSH menu
2. Press O on Any Option Selected

What is the expected output?

Action Should Be Disabled 

What version of the product are you using? On what operating system?

6.20 Pro B6

Original issue reported on code.google.com by ra4bits...@gmail.com on 4 Jun 2011 at 5:34

GoogleCodeExporter commented 8 years ago
i did this:

if(button_on & PSP_CTRL_LEFT)   direction = -1;

if(button_on & PSP_CTRL_CROSS) direction = 0;

//if(button_on & PSP_CTRL_CIRCLE) direction = 0;

if(button_on & PSP_CTRL_RIGHT)  direction = 1;

I commented out the "if(button_on & PSP_CTRL_CIRCLE) direction = 0;"
 then the button does not work when you press circle on vshmenu.

Original comment by brutefor...@gmail.com on 4 Jun 2011 at 10:18

GoogleCodeExporter commented 8 years ago
This isn't the right way to fix this bug, it shouldn't *always* ignore O unless 
it isn't already ignoring X. The inverse bug exists in VSHmenu for those who 
use O confirm.

Original comment by uberusha...@gmail.com on 6 Jun 2011 at 1:17

GoogleCodeExporter commented 8 years ago
its actually not a bug... its a feature for the ones that uses O as there 
confirm button(japanese PSPs)...

The one above(my post) just fits my needs and I also remove the ability to swap 
the X/O buttons in the Recovery menu since i don't need it.

Team Pro forgot to add the button check between X and O but the recovery menu 
has this check to which button is Confirm. this:

//Confirm button check for Recovery Menu
void get_confirm_button(void)
{
    int result = 0;

    sceUtilityGetSystemParamInt(9, &result);

    if (result == 0) { // Circle?
        g_ctrl_OK = PSP_CTRL_CIRCLE;
        g_ctrl_CANCEL = PSP_CTRL_CROSS;
    } else {
        g_ctrl_OK = PSP_CTRL_CROSS;
        g_ctrl_CANCEL = PSP_CTRL_CIRCLE;
    }
}

//and this is the button control for vsh menu no check

int menu_ctrl(u32 button_on)
{
    int direction;

    if( (button_on & PSP_CTRL_SELECT) ||
        (button_on & PSP_CTRL_HOME)) {
        menu_sel = TMENU_EXIT;
        return 1;
    }

    // change menu select
    direction = 0;

    if(button_on & PSP_CTRL_DOWN) direction++;
    if(button_on & PSP_CTRL_UP) direction--;

    menu_sel = limit(menu_sel+direction, 0, TMENU_MAX-1);

    if(psp_model == PSP_GO && menu_sel == TMENU_UMD_VIDEO) {
        menu_sel = limit(menu_sel+direction, 0, TMENU_MAX-1);
    }

    // LEFT & RIGHT
    direction = -2;

    if(button_on & PSP_CTRL_LEFT)   direction = -1;
    if(button_on & PSP_CTRL_CROSS) direction = 0;
    if(button_on & PSP_CTRL_CIRCLE) direction = 0;
    if(button_on & PSP_CTRL_RIGHT)  direction = 1;

    if(direction <= -2)
        return 0;

    switch(menu_sel) {
        case TMENU_XMB_CLOCK:
            if(direction) change_clock( direction, 0);
            break;
        case TMENU_GAME_CLOCK:
            if(direction) change_clock( direction, 1);
            break;
        case TMENU_USB_DEVICE:
            if(direction) change_usb( direction );
            break;
        case TMENU_UMD_MODE:
            if(direction) change_umd_mode( direction );
            break;
        case TMENU_UMD_VIDEO:
            if(direction) {
                change_umd_mount_idx(direction);

                if (0 != get_umdvideo_path(umdvideo_idx, umdvideo_path, sizeof(umdvideo_path))) {
                    strcpy(umdvideo_path, "None");
                }
            } else {
                return 7; // Mount UMDVideo ISO flag
            }
            break;
        case TMENU_RECOVERY_MENU:
            if(direction==0) {
                return 6; // Recovery menu flag
            }
            break;
        case TMENU_SHUTDOWN_DEVICE:
            if(direction==0) {
                return 3; // SHUTDOWN flag
            }
            break;
        case TMENU_RESET_DEVICE:
            if(direction==0) {
                return 2; // RESET flag
            }
            break;
        case TMENU_RESET_VSH:
            if(direction==0) {
                return 4; // RESET VSH flag
            }
            break;
        case TMENU_SUSPEND_DEVICE:
            if(direction==0) {
                return 5; // SUSPEND flag
            }
            break;
        case TMENU_EXIT:
            if(direction==0) return 1; // finish
            break;
    }

    return 0; // continue
}

and as you can see the shutdown and reset option is set to 0 which is the X and 
the O button. so its not a bug the code speaks for its self.

Original comment by brutefor...@gmail.com on 6 Jun 2011 at 1:55

GoogleCodeExporter commented 8 years ago

Original comment by outma...@gmail.com on 16 Jun 2011 at 12:59