some improvement

This commit is contained in:
TheFloW 2016-11-01 16:49:27 +01:00
parent 5c81ace625
commit a53d46037a
7 changed files with 20 additions and 18 deletions

6
file.c
View File

@ -883,10 +883,8 @@ int fileListGetDeviceEntries(FileList *list) {
int i;
for (i = 0; i < N_DEVICES; i++) {
if (devices[i]) {
if (is_molecular_shell) {
if (strcmp(devices[i], "ux0:") != 0)
continue;
}
if (is_molecular_shell && strcmp(devices[i], "ux0:") != 0)
continue;
SceIoStat stat;
memset(&stat, 0, sizeof(SceIoStat));

View File

@ -167,8 +167,8 @@ void loadLanguage(int id) {
LANGUAGE_ENTRY(INSTALL_BRICK_WARNING),
LANGUAGE_ENTRY(HASH_FILE_QUESTION),
// HENkaku configuration strings
LANGUAGE_ENTRY(HENKAKU_CONFIGURATION),
// HENkaku settings strings
LANGUAGE_ENTRY(HENKAKU_SETTINGS),
LANGUAGE_ENTRY(HENKAKU_ENABLE_PSN_SPOOFING),
LANGUAGE_ENTRY(HENKAKU_ENABLE_UNSAFE_HOMEBREW),
LANGUAGE_ENTRY(HENKAKU_ENABLE_VERSION_SPOOFING),

View File

@ -126,8 +126,8 @@ enum LanguageContainer {
INSTALL_BRICK_WARNING,
HASH_FILE_QUESTION,
// HENkaku configuration strings
HENKAKU_CONFIGURATION,
// HENkaku settings strings
HENKAKU_SETTINGS,
HENKAKU_ENABLE_PSN_SPOOFING,
HENKAKU_ENABLE_UNSAFE_HOMEBREW,
HENKAKU_ENABLE_VERSION_SPOOFING,

3
main.c
View File

@ -995,6 +995,9 @@ void initFtp() {
for (i = 0; i < getNumberOfDevices(); i++) {
char **devices = getDevices();
if (devices[i]) {
if (is_molecular_shell && strcmp(devices[i], "ux0:") != 0)
continue;
ftpvita_add_device(devices[i]);
}
}

View File

@ -106,8 +106,8 @@ INSTALL_WARNING = "This package requests extended permissio
INSTALL_BRICK_WARNING = "This package uses functions that remounts\partitions and can potentially brick your device.\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?"
# HENkaku configuration strings
HENKAKU_CONFIGURATION = "HENkaku configuration"
# HENkaku settings strings
HENKAKU_SETTINGS = "HENkaku settings"
HENKAKU_ENABLE_PSN_SPOOFING = "Enable PSN spoofing"
HENKAKU_ENABLE_UNSAFE_HOMEBREW = "Enable unsafe homebrew"
HENKAKU_ENABLE_VERSION_SPOOFING = "Enable version spoofing"

View File

@ -28,7 +28,7 @@
#include "henkaku_config.h"
/*
* HENkaku configuration *
* HENkaku settings *
- Enable PSN spoofing
- Enable unsafe homebrew
- Enable version spoofing
@ -48,7 +48,7 @@
static HENkakuConfig henkaku_config;
static char spoofed_version[8];
static char spoofed_version[5];
// Dummy
int language, theme;
@ -56,25 +56,25 @@ int language, theme;
static SettingsMenuEntry *settings_menu_entries = NULL;
static int n_settings_entries = 0;
SettingsMenuOption henkaku_configuration[] = {
SettingsMenuOption henkaku_settings[] = {
{ HENKAKU_ENABLE_PSN_SPOOFING, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, 0, &henkaku_config.use_psn_spoofing },
{ HENKAKU_ENABLE_UNSAFE_HOMEBREW, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, 0, &henkaku_config.allow_unsafe_hb },
{ HENKAKU_ENABLE_VERSION_SPOOFING, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, 0, &henkaku_config.use_spoofed_version },
{ HENKAKU_SPOOFED_VERSION, SETTINGS_OPTION_TYPE_STRING, spoofed_version, 5, NULL },
{ HENKAKU_SPOOFED_VERSION, SETTINGS_OPTION_TYPE_STRING, spoofed_version, sizeof(spoofed_version), NULL },
};
SettingsMenuOption vitashell_main[] = {
SettingsMenuOption main_settings[] = {
{ VITASHELL_SETTINGS_LANGUAGE, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, 0, &language },
{ VITASHELL_SETTINGS_THEME, SETTINGS_OPTION_TYPE_BOOLEAN, NULL, 0, &theme },
};
SettingsMenuEntry molecularshell_settings_menu_entries[] = {
{ HENKAKU_CONFIGURATION, henkaku_configuration, sizeof(henkaku_configuration) / sizeof(SettingsMenuOption) },
{ VITASHELL_SETTINGS_MAIN, vitashell_main, sizeof(vitashell_main) / sizeof(SettingsMenuOption) },
{ HENKAKU_SETTINGS, henkaku_settings, sizeof(henkaku_settings) / sizeof(SettingsMenuOption) },
{ VITASHELL_SETTINGS_MAIN, main_settings, sizeof(main_settings) / sizeof(SettingsMenuOption) },
};
SettingsMenuEntry vitashell_settings_menu_entries[] = {
{ VITASHELL_SETTINGS_MAIN, vitashell_main, sizeof(vitashell_main) / sizeof(SettingsMenuOption) },
{ VITASHELL_SETTINGS_MAIN, main_settings, sizeof(main_settings) / sizeof(SettingsMenuOption) },
};
static SettingsMenu settings_menu;

View File

@ -29,6 +29,7 @@ enum SettingsOptionType {
SETTINGS_OPTION_TYPE_BOOLEAN,
SETTINGS_OPTION_TYPE_INTEGER,
SETTINGS_OPTION_TYPE_STRING,
SETTINGS_OPTION_TYPE_CALLBACK,
};
enum SettingsMenuStatus {