MCPcopy Create free account
hub / github.com/TheOfficialFloW/VitaShell / fileBrowserMenuCtrl

Function fileBrowserMenuCtrl

browser.c:482–648  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482static int fileBrowserMenuCtrl() {
483 int refresh = 0;
484
485 // Short cuts combo
486 if (current_pad[PAD_LEFT])
487 return shortCuts();
488
489 // Settings menu
490 if (pressed_pad[PAD_START]) {
491 openSettingsMenu();
492 }
493
494 // SELECT button
495 if (pressed_pad[PAD_SELECT]) {
496 if (vitashell_config.select_button == SELECT_BUTTON_MODE_USB &&
497 sceKernelGetModel() == SCE_KERNEL_MODEL_VITA) {
498 if (isSafeMode()) {
499 infoDialog(language_container[EXTENDED_PERMISSIONS_REQUIRED]);
500 } else {
501 SceUdcdDeviceState state;
502 sceUdcdGetDeviceState(&state);
503
504 if (state.cable & SCE_UDCD_STATUS_CABLE_CONNECTED) {
505 initUsb();
506 } else {
507 initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_CANCEL,
508 language_container[USB_NOT_CONNECTED]);
509 setDialogStep(DIALOG_STEP_USB_WAIT);
510 }
511 }
512 } else if (vitashell_config.select_button == SELECT_BUTTON_MODE_FTP ||
513 sceKernelGetModel() == SCE_KERNEL_MODEL_VITATV) {
514 // Init FTP
515 if (!ftpvita_is_initialized()) {
516 int res = ftpvita_init(vita_ip, &vita_port);
517 if (res < 0) {
518 initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_CANCEL, language_container[PLEASE_WAIT]);
519 setDialogStep(DIALOG_STEP_FTP_WAIT);
520 } else {
521 initFtp();
522 }
523
524 // Lock power timers
525 powerLock();
526 }
527
528 // Dialog
529 if (ftpvita_is_initialized()) {
530 initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_OK_CANCEL, language_container[FTP_SERVER],
531 vita_ip, vita_port);
532 setDialogStep(DIALOG_STEP_FTP);
533 }
534 }
535 }
536
537 // Move
538 if (hold_pad[PAD_UP] || hold2_pad[PAD_LEFT_ANALOG_UP]) {
539 int old_pos = base_pos + rel_pos;

Callers 1

browserMainFunction · 0.85

Calls 15

shortCutsFunction · 0.85
openSettingsMenuFunction · 0.85
isSafeModeFunction · 0.85
infoDialogFunction · 0.85
initUsbFunction · 0.85
initMessageDialogFunction · 0.85
setDialogStepFunction · 0.85
initFtpFunction · 0.85
powerLockFunction · 0.85
getContextMenuModeFunction · 0.85
setContextMenuFunction · 0.85

Tested by

no test coverage detected