Added ability to disable vpk warning

This commit is contained in:
TheFloW 2018-08-27 17:51:18 +02:00
parent 90a6fafdf1
commit 36a16a48ea
17 changed files with 26 additions and 29 deletions

View File

@ -2,6 +2,7 @@
### Changelog 1.95 ### Changelog 1.95
- Added option to disable warning messages when installing vpks.
- Fixed bug in USB connection, where your Memory Card could be corrupted. - Fixed bug in USB connection, where your Memory Card could be corrupted.
- Fixed line breaks in SFO files and long names will now scroll. - Fixed line breaks in SFO files and long names will now scroll.
- Fixed compatibility with `udcd_uvc.skprx ` thanks to xerpi. - Fixed compatibility with `udcd_uvc.skprx ` thanks to xerpi.

View File

@ -222,11 +222,8 @@ int readConfigBuffer(void *buffer, int size, ConfigEntry *entries, int n_entries
int readConfig(const char *path, ConfigEntry *entries, int n_entries) { int readConfig(const char *path, ConfigEntry *entries, int n_entries) {
void *buffer = NULL; void *buffer = NULL;
int size = allocateReadFile(path, &buffer); int size = allocateReadFile(path, &buffer);
if (size < 0) { if (size < 0)
if (buffer)
free(buffer);
return size; return size;
}
readConfigBuffer(buffer, size, entries, n_entries); readConfigBuffer(buffer, size, entries, n_entries);

View File

@ -219,6 +219,7 @@ void loadLanguage(int id) {
LANGUAGE_ENTRY(VITASHELL_SETTINGS_USBDEVICE), LANGUAGE_ENTRY(VITASHELL_SETTINGS_USBDEVICE),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_SELECT_BUTTON), LANGUAGE_ENTRY(VITASHELL_SETTINGS_SELECT_BUTTON),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_NO_AUTO_UPDATE), LANGUAGE_ENTRY(VITASHELL_SETTINGS_NO_AUTO_UPDATE),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_WARNING_MESSAGE),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_RESTART_SHELL), LANGUAGE_ENTRY(VITASHELL_SETTINGS_RESTART_SHELL),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_POWER), LANGUAGE_ENTRY(VITASHELL_SETTINGS_POWER),
LANGUAGE_ENTRY(VITASHELL_SETTINGS_REBOOT), LANGUAGE_ENTRY(VITASHELL_SETTINGS_REBOOT),

View File

@ -178,6 +178,7 @@ enum LanguageContainer {
VITASHELL_SETTINGS_USBDEVICE, VITASHELL_SETTINGS_USBDEVICE,
VITASHELL_SETTINGS_SELECT_BUTTON, VITASHELL_SETTINGS_SELECT_BUTTON,
VITASHELL_SETTINGS_NO_AUTO_UPDATE, VITASHELL_SETTINGS_NO_AUTO_UPDATE,
VITASHELL_SETTINGS_WARNING_MESSAGE,
VITASHELL_SETTINGS_RESTART_SHELL, VITASHELL_SETTINGS_RESTART_SHELL,
VITASHELL_SETTINGS_POWER, VITASHELL_SETTINGS_POWER,
VITASHELL_SETTINGS_REBOOT, VITASHELL_SETTINGS_REBOOT,

View File

@ -13,4 +13,4 @@ VitaShellKernel2:
- shellKernelIsUx0Redirected - shellKernelIsUx0Redirected
- shellKernelRedirectUx0 - shellKernelRedirectUx0
- shellKernelMountById - shellKernelMountById
- shellKernelGetRifVitaKey - shellKernelGetRifVitaKey

View File

@ -33,4 +33,4 @@ int shellKernelRedirectUx0(const char *blkdev, const char *blkdev2);
int shellKernelMountById(ShellMountIdArgs *args); int shellKernelMountById(ShellMountIdArgs *args);
int shellKernelGetRifVitaKey(const void *license_buf, void *klicensee); int shellKernelGetRifVitaKey(const void *license_buf, void *klicensee);
#endif #endif

View File

@ -5,4 +5,4 @@ VitaShellPatch:
minor: 0 minor: 0
main: main:
start: module_start start: module_start
stop: module_stop stop: module_stop

View File

@ -56,4 +56,4 @@ int module_stop(SceSize args, void *argp) {
taiInjectReleaseForKernel(hooks[0]); taiInjectReleaseForKernel(hooks[0]);
return SCE_KERNEL_STOP_SUCCESS; return SCE_KERNEL_STOP_SUCCESS;
} }

View File

@ -5,4 +5,4 @@ VitaShellUsbDevice:
minor: 0 minor: 0
main: main:
start: module_start start: module_start
stop: module_stop stop: module_stop

View File

@ -13,4 +13,4 @@ VitaShellUser:
- shellUserIsUx0Redirected - shellUserIsUx0Redirected
- shellUserRedirectUx0 - shellUserRedirectUx0
- shellUserMountById - shellUserMountById
- shellUserGetRifVitaKey - shellUserGetRifVitaKey

View File

@ -49,4 +49,4 @@ int module_start(SceSize args, void *argp) {
int module_stop(SceSize args, void *argp) { int module_stop(SceSize args, void *argp) {
return SCE_KERNEL_STOP_SUCCESS; return SCE_KERNEL_STOP_SUCCESS;
} }

View File

@ -26,4 +26,4 @@ int shellUserRedirectUx0(const char *blkdev, const char *blkdev2);
int shellUserMountById(ShellMountIdArgs *args); int shellUserMountById(ShellMountIdArgs *args);
int shellUserGetRifVitaKey(const void *license_buf, void *klicensee); int shellUserGetRifVitaKey(const void *license_buf, void *klicensee);
#endif #endif

View File

@ -193,11 +193,8 @@ int makeHeadBin() {
// Read param.sfo // Read param.sfo
void *sfo_buffer = NULL; void *sfo_buffer = NULL;
int res = allocateReadFile(PACKAGE_DIR "/sce_sys/param.sfo", &sfo_buffer); int res = allocateReadFile(PACKAGE_DIR "/sce_sys/param.sfo", &sfo_buffer);
if (res < 0) { if (res < 0)
if (sfo_buffer)
free(sfo_buffer);
return res; return res;
}
// Get title id // Get title id
char titleid[12]; char titleid[12];
@ -336,7 +333,7 @@ int install_thread(SceSize args_size, InstallArguments *args) {
// Team molecule's request: Full permission access warning // Team molecule's request: Full permission access warning
uint64_t authid = *(uint64_t *)(buffer + 0x80); uint64_t authid = *(uint64_t *)(buffer + 0x80);
if (authid != 0x2F00000000000002) { if (!vitashell_config.disable_warning && authid != 0x2F00000000000002) {
closeWaitDialog(); closeWaitDialog();
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_WARNING]); initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[INSTALL_WARNING]);
@ -399,7 +396,7 @@ int install_thread(SceSize args_size, InstallArguments *args) {
// Team molecule's request: Full permission access warning // Team molecule's request: Full permission access warning
int unsafe = archiveCheckFilesForUnsafeFself(); // 0: Safe, 1: Unsafe, 2: Dangerous int unsafe = archiveCheckFilesForUnsafeFself(); // 0: Safe, 1: Unsafe, 2: Dangerous
if (unsafe) { if (!vitashell_config.disable_warning && unsafe) {
closeWaitDialog(); closeWaitDialog();
initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[unsafe == 2 ? INSTALL_BRICK_WARNING : INSTALL_WARNING]); initMessageDialog(SCE_MSG_DIALOG_BUTTON_TYPE_YESNO, language_container[unsafe == 2 ? INSTALL_BRICK_WARNING : INSTALL_WARNING]);

View File

@ -60,11 +60,8 @@ int refreshNeeded(const char *app_path)
snprintf(sfo_path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", app_path); snprintf(sfo_path, MAX_PATH_LENGTH, "%s/sce_sys/param.sfo", app_path);
void *sfo_buffer = NULL; void *sfo_buffer = NULL;
int sfo_size = allocateReadFile(sfo_path, &sfo_buffer); int sfo_size = allocateReadFile(sfo_path, &sfo_buffer);
if (sfo_size < 0) { if (sfo_size < 0)
if (sfo_buffer)
free(sfo_buffer);
return sfo_size; return sfo_size;
}
// Get title and content ids // Get title and content ids
char titleid[12], contentid[50]; char titleid[12], contentid[50];

View File

@ -159,6 +159,7 @@ VITASHELL_SETTINGS_THEME = "Theme"
VITASHELL_SETTINGS_USBDEVICE = "USB device" VITASHELL_SETTINGS_USBDEVICE = "USB device"
VITASHELL_SETTINGS_SELECT_BUTTON = "SELECT button" VITASHELL_SETTINGS_SELECT_BUTTON = "SELECT button"
VITASHELL_SETTINGS_NO_AUTO_UPDATE = "Disable auto-update" VITASHELL_SETTINGS_NO_AUTO_UPDATE = "Disable auto-update"
VITASHELL_SETTINGS_WARNING_MESSAGE = "Disable warning messages"
VITASHELL_SETTINGS_RESTART_SHELL = "Restart VitaShell" VITASHELL_SETTINGS_RESTART_SHELL = "Restart VitaShell"
VITASHELL_SETTINGS_POWER = "Power" VITASHELL_SETTINGS_POWER = "Power"
VITASHELL_SETTINGS_REBOOT = "Reboot" VITASHELL_SETTINGS_REBOOT = "Reboot"

View File

@ -57,16 +57,17 @@ static ConfigEntry theme_entries[] = {
}; };
SettingsMenuOption main_settings[] = { SettingsMenuOption main_settings[] = {
// { VITASHELL_SETTINGS_LANGUAGE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, NULL, 0, NULL, 0, &language }, // { VITASHELL_SETTINGS_LANGUAGE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, NULL, 0, NULL, 0, &language },
{ VITASHELL_SETTINGS_THEME, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0, NULL, 0, NULL }, { VITASHELL_SETTINGS_THEME, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0, NULL, 0, NULL },
{ VITASHELL_SETTINGS_USBDEVICE, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0, { VITASHELL_SETTINGS_USBDEVICE, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0,
usbdevice_options, sizeof(usbdevice_options) / sizeof(char **), &vitashell_config.usbdevice }, usbdevice_options, sizeof(usbdevice_options) / sizeof(char **), &vitashell_config.usbdevice },
{ VITASHELL_SETTINGS_SELECT_BUTTON, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0, { VITASHELL_SETTINGS_SELECT_BUTTON, SETTINGS_OPTION_TYPE_OPTIONS, NULL, NULL, 0,
select_button_options, sizeof(select_button_options) / sizeof(char **), &vitashell_config.select_button }, select_button_options, sizeof(select_button_options) / sizeof(char **), &vitashell_config.select_button },
{ VITASHELL_SETTINGS_NO_AUTO_UPDATE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, NULL, 0, NULL, 0, &vitashell_config.disable_autoupdate }, { VITASHELL_SETTINGS_NO_AUTO_UPDATE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, NULL, 0, NULL, 0, &vitashell_config.disable_autoupdate },
{ VITASHELL_SETTINGS_WARNING_MESSAGE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, NULL, 0, NULL, 0, &vitashell_config.disable_warning },
{ VITASHELL_SETTINGS_RESTART_SHELL, SETTINGS_OPTION_TYPE_CALLBACK, (void *)restartShell, NULL, 0, NULL, 0, NULL },
{ VITASHELL_SETTINGS_RESTART_SHELL, SETTINGS_OPTION_TYPE_CALLBACK, (void *)restartShell, NULL, 0, NULL, 0, NULL },
}; };
SettingsMenuOption power_settings[] = { SettingsMenuOption power_settings[] = {

View File

@ -35,6 +35,7 @@ typedef struct {
int usbdevice; int usbdevice;
int select_button; int select_button;
int disable_autoupdate; int disable_autoupdate;
int disable_warning;
} VitaShellConfig; } VitaShellConfig;
#endif #endif