mirror of
https://github.com/joel16/VitaShell.git
synced 2025-02-25 14:53:15 +00:00
Merge remote-tracking branch 'refs/remotes/TheOfficialFloW/master'
This commit is contained in:
commit
f30f7f425f
15
file.c
15
file.c
@ -23,13 +23,13 @@
|
||||
#include "sha1.h"
|
||||
|
||||
static char *mount_points[] = {
|
||||
"app0:",
|
||||
// "app0:",
|
||||
"gro0:",
|
||||
"grw0:",
|
||||
"os0:",
|
||||
"pd0:",
|
||||
"sa0:",
|
||||
"savedata0:",
|
||||
// "savedata0:",
|
||||
"tm0:",
|
||||
"ud0:",
|
||||
"ur0:",
|
||||
@ -834,6 +834,17 @@ int fileListGetMountPointEntries(FileList *list) {
|
||||
entry->is_folder = 1;
|
||||
entry->type = FILE_TYPE_UNKNOWN;
|
||||
|
||||
SceIoDevInfo info;
|
||||
memset(&info, 0, sizeof(SceIoDevInfo));
|
||||
int res = sceIoDevctl(entry->name, 0x3001, 0, 0, &info, sizeof(SceIoDevInfo));
|
||||
if (res >= 0) {
|
||||
entry->size = info.free_size;
|
||||
entry->size2 = info.max_size;
|
||||
} else {
|
||||
entry->size = 0;
|
||||
entry->size2 = 0;
|
||||
}
|
||||
|
||||
memcpy(&entry->time, (SceDateTime *)&stat.st_ctime, sizeof(SceDateTime));
|
||||
|
||||
fileListAddEntry(list, entry, SORT_BY_NAME_AND_FOLDER);
|
||||
|
1
file.h
1
file.h
@ -69,6 +69,7 @@ typedef struct FileListEntry {
|
||||
int is_folder;
|
||||
int type;
|
||||
SceOff size;
|
||||
SceOff size2;
|
||||
SceDateTime time;
|
||||
int reserved[16];
|
||||
} FileListEntry;
|
||||
|
@ -22,6 +22,13 @@
|
||||
#define SCE_ERROR_ERRNO_EEXIST 0x80010011
|
||||
#define SCE_ERROR_ERRNO_ENODEV 0x80010013
|
||||
|
||||
typedef struct {
|
||||
uint64_t max_size;
|
||||
uint64_t free_size;
|
||||
uint32_t cluster_size;
|
||||
void *unk;
|
||||
} SceIoDevInfo;
|
||||
|
||||
typedef struct {
|
||||
SceUInt size;
|
||||
SceChar8 version_string[28];
|
||||
|
@ -108,6 +108,7 @@ void loadLanguage(int id) {
|
||||
LANGUAGE_ENTRY(RENAME),
|
||||
LANGUAGE_ENTRY(NEW_FOLDER),
|
||||
LANGUAGE_ENTRY(INSTALL_ALL),
|
||||
LANGUAGE_ENTRY(INSTALL_FOLDER),
|
||||
LANGUAGE_ENTRY(CALCULATE_SHA1),
|
||||
LANGUAGE_ENTRY(EXPORT_MEDIA),
|
||||
LANGUAGE_ENTRY(SEARCH),
|
||||
@ -129,6 +130,7 @@ void loadLanguage(int id) {
|
||||
LANGUAGE_ENTRY(EXPORT_PICTURES_INFO),
|
||||
LANGUAGE_ENTRY(EXPORT_SONGS_PICTURES_INFO),
|
||||
LANGUAGE_ENTRY(INSTALL_ALL_QUESTION),
|
||||
LANGUAGE_ENTRY(INSTALL_FOLDER_QUESTION),
|
||||
LANGUAGE_ENTRY(INSTALL_QUESTION),
|
||||
LANGUAGE_ENTRY(INSTALL_WARNING),
|
||||
LANGUAGE_ENTRY(HASH_FILE_QUESTION),
|
||||
|
@ -66,6 +66,7 @@ enum LanguageContainer {
|
||||
RENAME,
|
||||
NEW_FOLDER,
|
||||
INSTALL_ALL,
|
||||
INSTALL_FOLDER,
|
||||
CALCULATE_SHA1,
|
||||
EXPORT_MEDIA,
|
||||
SEARCH,
|
||||
@ -87,6 +88,7 @@ enum LanguageContainer {
|
||||
EXPORT_PICTURES_INFO,
|
||||
EXPORT_SONGS_PICTURES_INFO,
|
||||
INSTALL_ALL_QUESTION,
|
||||
INSTALL_FOLDER_QUESTION,
|
||||
INSTALL_QUESTION,
|
||||
INSTALL_WARNING,
|
||||
HASH_FILE_QUESTION,
|
||||
|
82
main.c
82
main.c
@ -410,18 +410,6 @@ void drawShellInfo(char *path) {
|
||||
// Show numbers of files and folders
|
||||
// sprintf(str, "%d files and %d folders", file_list.files, file_list.folders);
|
||||
|
||||
// Show memory card
|
||||
/*
|
||||
uint64_t free_size = 0, max_size = 0;
|
||||
sceAppMgrGetDevInfo("ux0:", &max_size, &free_size);
|
||||
|
||||
char free_size_string[16], max_size_string[16];
|
||||
getSizeString(free_size_string, free_size);
|
||||
getSizeString(max_size_string, max_size);
|
||||
|
||||
sprintf(str, "%s/%s", free_size_string, max_size_string);
|
||||
*/
|
||||
|
||||
// Draw on bottom left
|
||||
// pgf_draw_textf(ALIGN_LEFT(SCREEN_WIDTH - SHELL_MARGIN_X, vita2d_pgf_text_width(font, FONT_SIZE, str)), SCREEN_HEIGHT - SHELL_MARGIN_Y - FONT_Y_SPACE - 2.0f, LITEGRAY, FONT_SIZE, str);
|
||||
}
|
||||
@ -460,12 +448,14 @@ MenuEntry menu_entries[] = {
|
||||
|
||||
enum MenuMoreEntrys {
|
||||
MENU_MORE_ENTRY_INSTALL_ALL,
|
||||
MENU_MORE_ENTRY_INSTALL_FOLDER,
|
||||
MENU_MORE_ENTRY_EXPORT_MEDIA,
|
||||
MENU_MORE_ENTRY_CALCULATE_SHA1,
|
||||
};
|
||||
|
||||
MenuEntry menu_more_entries[] = {
|
||||
{ INSTALL_ALL, CTX_VISIBILITY_INVISIBLE },
|
||||
{ INSTALL_FOLDER, CTX_VISIBILITY_INVISIBLE },
|
||||
{ EXPORT_MEDIA, CTX_VISIBILITY_INVISIBLE },
|
||||
{ CALCULATE_SHA1, CTX_VISIBILITY_INVISIBLE },
|
||||
};
|
||||
@ -572,6 +562,7 @@ void setContextMenuMoreVisibilities() {
|
||||
// Invisble entries when on '..'
|
||||
if (strcmp(file_entry->name, DIR_UP) == 0) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_ALL].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_EXPORT_MEDIA].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_CALCULATE_SHA1].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
}
|
||||
@ -579,12 +570,36 @@ void setContextMenuMoreVisibilities() {
|
||||
// Invisble operations in archives
|
||||
if (isInArchive()) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_ALL].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_EXPORT_MEDIA].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
menu_more_entries[MENU_MORE_ENTRY_CALCULATE_SHA1].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
}
|
||||
|
||||
if (file_entry->is_folder) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_CALCULATE_SHA1].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
do {
|
||||
char check_path[MAX_PATH_LENGTH];
|
||||
SceIoStat stat;
|
||||
int statres;
|
||||
if (strcmp(file_list.path, "ux0:app/") == 0 || strcmp(file_list.path, "ux0:patch/") == 0) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
break;
|
||||
}
|
||||
snprintf(check_path, MAX_PATH_LENGTH, "%s%s/eboot.bin", file_list.path, file_entry->name);
|
||||
statres = sceIoGetstat(check_path, &stat);
|
||||
if (statres < 0 || SCE_S_ISDIR(stat.st_mode)) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
break;
|
||||
}
|
||||
snprintf(check_path, MAX_PATH_LENGTH, "%s%s/sce_sys/param.sfo", file_list.path, file_entry->name);
|
||||
statres = sceIoGetstat(check_path, &stat);
|
||||
if (statres < 0 || SCE_S_ISDIR(stat.st_mode)) {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
break;
|
||||
}
|
||||
} while(0);
|
||||
} else {
|
||||
menu_more_entries[MENU_MORE_ENTRY_INSTALL_FOLDER].visibility = CTX_VISIBILITY_INVISIBLE;
|
||||
}
|
||||
|
||||
if(file_entry->type != FILE_TYPE_VPK) {
|
||||
@ -866,6 +881,15 @@ int contextMenuMoreEnterCallback(int pos, void* context) {
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case MENU_MORE_ENTRY_INSTALL_FOLDER:
|
||||
{
|
||||
FileListEntry *file_entry = fileListGetNthEntry(&file_list, base_pos + rel_pos);
|
||||
snprintf(cur_file, MAX_PATH_LENGTH, "%s%s", file_list.path, file_entry->name);
|
||||
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_FOLDER_QUESTION]);
|
||||
dialog_step = DIALOG_STEP_INSTALL_QUESTION;
|
||||
break;
|
||||
}
|
||||
|
||||
case MENU_MORE_ENTRY_EXPORT_MEDIA:
|
||||
{
|
||||
@ -1210,6 +1234,7 @@ int dialogSteps() {
|
||||
}
|
||||
|
||||
dialog_step = DIALOG_STEP_NONE;
|
||||
refresh = 1;
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1594,11 +1619,32 @@ int shellMain() {
|
||||
|
||||
// File information
|
||||
if (strcmp(file_entry->name, DIR_UP) != 0) {
|
||||
// Folder/size
|
||||
char size_string[16];
|
||||
getSizeString(size_string, file_entry->size);
|
||||
char *str = NULL;
|
||||
|
||||
char *str = file_entry->is_folder ? language_container[FOLDER] : size_string;
|
||||
if (dir_level == 0) {
|
||||
if (file_entry->size != 0 && file_entry->size2 != 0) {
|
||||
char free_size_string[16], max_size_string[16];
|
||||
getSizeString(free_size_string, file_entry->size2 - file_entry->size);
|
||||
getSizeString(max_size_string, file_entry->size2);
|
||||
|
||||
char string[32];
|
||||
snprintf(string, sizeof(string), "%s / %s", free_size_string, max_size_string);
|
||||
|
||||
str = string;
|
||||
} else {
|
||||
str = "-";
|
||||
}
|
||||
} else {
|
||||
if (!file_entry->is_folder) {
|
||||
// Folder/size
|
||||
char string[16];
|
||||
getSizeString(string, file_entry->size);
|
||||
|
||||
str = string;
|
||||
} else {
|
||||
str = language_container[FOLDER];
|
||||
}
|
||||
}
|
||||
|
||||
pgf_draw_text(ALIGN_LEFT(INFORMATION_X, vita2d_pgf_text_width(font, FONT_SIZE, str)), y, color, FONT_SIZE, str);
|
||||
|
||||
@ -1674,6 +1720,10 @@ void ftpvita_PROM(ftpvita_client_info_t *client) {
|
||||
}
|
||||
|
||||
int main(int argc, const char *argv[]) {
|
||||
// Set CPU to 444mhz
|
||||
scePowerSetArmClockFrequency(444);
|
||||
|
||||
// Init audio
|
||||
vitaAudioInit(0x40);
|
||||
|
||||
// Init VitaShell
|
||||
|
@ -183,9 +183,7 @@ int promoteApp(char *path) {
|
||||
int deleteApp(char *titleid) {
|
||||
int res;
|
||||
|
||||
char temp[0x100];
|
||||
|
||||
res = _sceAppMgrDestroyAppByName(titleid, temp);
|
||||
res = sceAppMgrDestroyAppByName(titleid);
|
||||
if (res < 0 && res != 0x80802012)
|
||||
return res;
|
||||
|
||||
@ -369,6 +367,8 @@ int install_thread(SceSize args_size, InstallArguments *args) {
|
||||
int res;
|
||||
SceUID thid = -1;
|
||||
char path[MAX_PATH_LENGTH];
|
||||
SceIoStat stat;
|
||||
int isFolder = 0;
|
||||
|
||||
// Lock power timers
|
||||
powerLock();
|
||||
@ -381,104 +381,166 @@ int install_thread(SceSize args_size, InstallArguments *args) {
|
||||
removePath(PACKAGE_PARENT, NULL);
|
||||
sceIoMkdir(PACKAGE_PARENT, 0777);
|
||||
|
||||
// Open archive
|
||||
res = archiveOpen(args->file);
|
||||
res = sceIoGetstat(args->file, &stat);
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// If you cancelled at the time archiveOpen was working,
|
||||
// it would still open the full permission dialog instead of termiating.
|
||||
// So terminate now
|
||||
if (cancelHandler()) {
|
||||
closeWaitDialog();
|
||||
dialog_step = DIALOG_STEP_CANCELLED;
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Check for param.sfo
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", args->file);
|
||||
if (archiveFileGetstat(path, NULL) < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(-2);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Check permissions
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/eboot.bin", args->file);
|
||||
SceUID fd = archiveFileOpen(path, SCE_O_RDONLY, 0);
|
||||
if (fd >= 0) {
|
||||
char buffer[0x88];
|
||||
archiveFileRead(fd, buffer, sizeof(buffer));
|
||||
archiveFileClose(fd);
|
||||
|
||||
// Team molecule's request: Full permission access warning
|
||||
uint64_t authid = *(uint64_t *)(buffer + 0x80);
|
||||
if (authid == 0x2F00000000000001 || authid == 0x2F00000000000003) {
|
||||
if (SCE_S_ISDIR(stat.st_mode)) {
|
||||
// Check for param.sfo
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", args->file);
|
||||
if (sceIoGetstat(path, &stat) < 0 || SCE_S_ISDIR(stat.st_mode)) {
|
||||
closeWaitDialog();
|
||||
|
||||
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_WARNING]);
|
||||
dialog_step = DIALOG_STEP_INSTALL_WARNING;
|
||||
|
||||
// Wait for response
|
||||
while (dialog_step == DIALOG_STEP_INSTALL_WARNING) {
|
||||
sceKernelDelayThread(10 * 1000);
|
||||
}
|
||||
|
||||
// Cancelled
|
||||
if (dialog_step == DIALOG_STEP_CANCELLED) {
|
||||
closeWaitDialog();
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Init again
|
||||
initMessageDialog(MESSAGE_DIALOG_PROGRESS_BAR, language_container[INSTALLING]);
|
||||
dialog_step = DIALOG_STEP_INSTALLING;
|
||||
errorDialog(-2);
|
||||
goto EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
// Src path
|
||||
char src_path[MAX_PATH_LENGTH];
|
||||
strcpy(src_path, args->file);
|
||||
addEndSlash(src_path);
|
||||
// Check permissions
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/eboot.bin", args->file);
|
||||
SceUID fd = sceIoOpen(path, SCE_O_RDONLY, 0);
|
||||
if (fd >= 0) {
|
||||
char buffer[0x88];
|
||||
sceIoRead(fd, buffer, sizeof(buffer));
|
||||
sceIoClose(fd);
|
||||
|
||||
// Get archive path info
|
||||
uint64_t size = 0;
|
||||
uint32_t folders = 0, files = 0;
|
||||
getArchivePathInfo(src_path, &size, &folders, &files);
|
||||
// Team molecule's request: Full permission access warning
|
||||
uint64_t authid = *(uint64_t *)(buffer + 0x80);
|
||||
if (authid == 0x2F00000000000001 || authid == 0x2F00000000000003) {
|
||||
closeWaitDialog();
|
||||
|
||||
// Check memory card free space
|
||||
if (checkMemoryCardFreeSpace(size))
|
||||
goto EXIT;
|
||||
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_WARNING]);
|
||||
dialog_step = DIALOG_STEP_INSTALL_WARNING;
|
||||
|
||||
// Update thread
|
||||
thid = createStartUpdateThread(size + folders);
|
||||
// Wait for response
|
||||
while (dialog_step == DIALOG_STEP_INSTALL_WARNING) {
|
||||
sceKernelDelayThread(10 * 1000);
|
||||
}
|
||||
|
||||
// Extract process
|
||||
uint64_t value = 0;
|
||||
// Cancelled
|
||||
if (dialog_step == DIALOG_STEP_CANCELLED) {
|
||||
closeWaitDialog();
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
FileProcessParam param;
|
||||
param.value = &value;
|
||||
param.max = size + folders;
|
||||
param.SetProgress = SetProgress;
|
||||
param.cancelHandler = cancelHandler;
|
||||
// Init again
|
||||
initMessageDialog(MESSAGE_DIALOG_PROGRESS_BAR, language_container[INSTALLING]);
|
||||
dialog_step = DIALOG_STEP_INSTALLING;
|
||||
}
|
||||
}
|
||||
|
||||
res = extractArchivePath(src_path, PACKAGE_DIR "/", ¶m);
|
||||
if (res <= 0) {
|
||||
closeWaitDialog();
|
||||
dialog_step = DIALOG_STEP_CANCELLED;
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
res = sceIoRename(args->file, PACKAGE_DIR);
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
dialog_step = DIALOG_STEP_CANCELLED;
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
sceMsgDialogProgressBarSetValue(SCE_MSG_DIALOG_PROGRESSBAR_TARGET_BAR_DEFAULT, 50);
|
||||
sceKernelDelayThread(COUNTUP_WAIT);
|
||||
|
||||
// Close archive
|
||||
res = archiveClose();
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
isFolder = 1;
|
||||
} else {
|
||||
// Open archive
|
||||
res = archiveOpen(args->file);
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// If you cancelled at the time archiveOpen was working,
|
||||
// it would still open the full permission dialog instead of termiating.
|
||||
// So terminate now
|
||||
if (cancelHandler()) {
|
||||
closeWaitDialog();
|
||||
dialog_step = DIALOG_STEP_CANCELLED;
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Check for param.sfo
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", args->file);
|
||||
if (archiveFileGetstat(path, NULL) < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(-2);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Check permissions
|
||||
snprintf(path, MAX_PATH_LENGTH, "%s/eboot.bin", args->file);
|
||||
SceUID fd = archiveFileOpen(path, SCE_O_RDONLY, 0);
|
||||
if (fd >= 0) {
|
||||
char buffer[0x88];
|
||||
archiveFileRead(fd, buffer, sizeof(buffer));
|
||||
archiveFileClose(fd);
|
||||
|
||||
// Team molecule's request: Full permission access warning
|
||||
uint64_t authid = *(uint64_t *)(buffer + 0x80);
|
||||
if (authid == 0x2F00000000000001 || authid == 0x2F00000000000003) {
|
||||
closeWaitDialog();
|
||||
|
||||
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_WARNING]);
|
||||
dialog_step = DIALOG_STEP_INSTALL_WARNING;
|
||||
|
||||
// Wait for response
|
||||
while (dialog_step == DIALOG_STEP_INSTALL_WARNING) {
|
||||
sceKernelDelayThread(10 * 1000);
|
||||
}
|
||||
|
||||
// Cancelled
|
||||
if (dialog_step == DIALOG_STEP_CANCELLED) {
|
||||
closeWaitDialog();
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Init again
|
||||
initMessageDialog(MESSAGE_DIALOG_PROGRESS_BAR, language_container[INSTALLING]);
|
||||
dialog_step = DIALOG_STEP_INSTALLING;
|
||||
}
|
||||
}
|
||||
|
||||
// Src path
|
||||
char src_path[MAX_PATH_LENGTH];
|
||||
strcpy(src_path, args->file);
|
||||
addEndSlash(src_path);
|
||||
|
||||
// Get archive path info
|
||||
uint64_t size = 0;
|
||||
uint32_t folders = 0, files = 0;
|
||||
getArchivePathInfo(src_path, &size, &folders, &files);
|
||||
|
||||
// Check memory card free space
|
||||
if (checkMemoryCardFreeSpace(size))
|
||||
goto EXIT;
|
||||
|
||||
// Update thread
|
||||
thid = createStartUpdateThread(size + folders);
|
||||
|
||||
// Extract process
|
||||
uint64_t value = 0;
|
||||
|
||||
FileProcessParam param;
|
||||
param.value = &value;
|
||||
param.max = size + folders;
|
||||
param.SetProgress = SetProgress;
|
||||
param.cancelHandler = cancelHandler;
|
||||
|
||||
res = extractArchivePath(src_path, PACKAGE_DIR "/", ¶m);
|
||||
if (res <= 0) {
|
||||
closeWaitDialog();
|
||||
dialog_step = DIALOG_STEP_CANCELLED;
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
// Close archive
|
||||
res = archiveClose();
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
goto EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
// Make head.bin
|
||||
@ -486,6 +548,8 @@ int install_thread(SceSize args_size, InstallArguments *args) {
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
// If failed, move package folder back
|
||||
if (isFolder) sceIoRename(PACKAGE_DIR, args->file);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
@ -494,6 +558,8 @@ int install_thread(SceSize args_size, InstallArguments *args) {
|
||||
if (res < 0) {
|
||||
closeWaitDialog();
|
||||
errorDialog(res);
|
||||
// If failed, move package folder back
|
||||
if (isFolder) sceIoRename(PACKAGE_DIR, args->file);
|
||||
goto EXIT;
|
||||
}
|
||||
|
||||
@ -518,4 +584,4 @@ EXIT:
|
||||
powerUnlock();
|
||||
|
||||
return sceKernelExitDeleteThread(0);
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ DELETE = "Delete"
|
||||
RENAME = "Rename"
|
||||
NEW_FOLDER = "New folder"
|
||||
INSTALL_ALL = "Install all"
|
||||
INSTALL_FOLDER = "Install folder"
|
||||
CALCULATE_SHA1 = "Calculate SHA1"
|
||||
EXPORT_MEDIA = "Export media"
|
||||
SEARCH = "Search"
|
||||
@ -67,6 +68,7 @@ EXPORT_SONGS_INFO = "Exported %d song(s)."
|
||||
EXPORT_PICTURES_INFO = "Exported %d picture(s)."
|
||||
EXPORT_SONGS_PICTURES_INFO = "Exported %d song(s) and %d picture(s)."
|
||||
INSTALL_ALL_QUESTION = "Do you want to install all packages available in this folder?"
|
||||
INSTALL_FOLDER_QUESTION = "Do you want to install this folder?\Warning: this action will also delete\the folder after installation!"
|
||||
INSTALL_QUESTION = "Do you want to install this package?"
|
||||
INSTALL_WARNING = "This package requests extended permissions.\It will have access to your personal information.\If you did not obtain it from a trusted source,\please proceed at your own caution.\\Would you like to continue the install?"
|
||||
HASH_FILE_QUESTION = "SHA1 hashing may take a long time. Continue?"
|
||||
@ -80,4 +82,4 @@ FTP_SERVER = "FTP server is now running at\ftp://%s:%i
|
||||
SYS_INFO = "System software: %s\Model: 0x%08X\MAC address: %s\IP address: %s\Memory card: %s/%s\Battery level: %d%%"
|
||||
UPDATE_QUESTION = "VitaShell %s is now available.\\Do you want to update the application?"
|
||||
TOOLBOX = "Toolbox"
|
||||
SYSINFO_TITLE = "System Information"
|
||||
SYSINFO_TITLE = "System Information"
|
||||
|
2
text.c
2
text.c
@ -357,7 +357,7 @@ static int cmp (const void * a, const void * b) {
|
||||
static int contextMenuEnterCallback(int pos, void *context) {
|
||||
TextEditorState *state = (TextEditorState*) context;
|
||||
|
||||
debugPrintf("ContextMenu Callback: %i\n", pos);
|
||||
// debugPrintf("ContextMenu Callback: %i\n", pos);
|
||||
|
||||
switch (pos) {
|
||||
case TEXT_MENU_ENTRY_SEARCH:
|
||||
|
Loading…
x
Reference in New Issue
Block a user