mirror of
https://github.com/joel16/VitaShell.git
synced 2024-11-26 21:30:45 +00:00
Fixed compatibility with udcd_uvc.skprx thanks to @xerpi
This commit is contained in:
parent
f067de203a
commit
90a6fafdf1
@ -4,6 +4,7 @@
|
||||
|
||||
- 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 compatibility with `udcd_uvc.skprx ` thanks to xerpi.
|
||||
|
||||
### Changelog 1.94
|
||||
|
||||
|
@ -66,6 +66,8 @@ file(GLOB res_files RELATIVE
|
||||
resources/*.txt
|
||||
resources/*.bin
|
||||
)
|
||||
|
||||
# ugly hack
|
||||
add_resources(vitashell_res
|
||||
${res_files}
|
||||
build/modules/kernel/kernel.skprx
|
||||
@ -207,6 +209,7 @@ vita_create_vpk(VitaShell.vpk ${VITA_TITLEID} eboot.bin
|
||||
pkg/sce_sys/livearea/contents/template.xml sce_sys/livearea/contents/template.xml
|
||||
)
|
||||
|
||||
# for network update
|
||||
add_custom_target(release
|
||||
COMMAND cp eboot.bin ../release/eboot.bin
|
||||
COMMAND cp VitaShell.vpk_param.sfo ../release/param.sfo
|
||||
|
@ -813,4 +813,4 @@ void drawAdhocDialog() {
|
||||
enter_button == SCE_SYSTEM_PARAM_ENTER_BUTTON_CIRCLE ? CROSS : CIRCLE, language_container[CANCEL]);
|
||||
pgf_draw_text(ALIGN_CENTER(SCREEN_WIDTH, pgf_text_width(button_string)), string_y + FONT_Y_SPACE, DIALOG_COLOR, button_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -58,4 +58,4 @@ int initAdhocDialog();
|
||||
void adhocDialogCtrl();
|
||||
void drawAdhocDialog();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -560,7 +560,8 @@ int fileListGetArchiveEntries(FileList *list, const char *path, int sort) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int getArchivePathInfo(const char *path, uint64_t *size, uint32_t *folders, uint32_t *files, int (* handler)(const char *path)) {
|
||||
int getArchivePathInfo(const char *path, uint64_t *size, uint32_t *folders,
|
||||
uint32_t *files, int (* handler)(const char *path)) {
|
||||
if (is_psarc)
|
||||
return getPsarcPathInfo(path, size, folders, files, handler);
|
||||
|
||||
@ -957,4 +958,4 @@ int archiveOpen(const char *file) {
|
||||
|
||||
archive_read_free(archive);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -43,4 +43,4 @@ void archiveSetPassword(char *string);
|
||||
|
||||
int archiveCheckFilesForUnsafeFself();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
config.c
2
config.c
@ -301,4 +301,4 @@ int writeConfig(const char *path, ConfigEntry *entries, int n_entries) {
|
||||
sceIoClose(fd);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
2
config.h
2
config.h
@ -40,4 +40,4 @@ int readConfigBuffer(void *buffer, int size, ConfigEntry *entries, int n_entries
|
||||
int readConfig(const char *path, ConfigEntry *entries, int n_entries);
|
||||
int writeConfig(const char *path, ConfigEntry *entries, int n_entries);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -204,4 +204,4 @@ void contextMenuCtrl() {
|
||||
ctx_menu_mode = cur_ctx->callback(cur_ctx->sel, cur_ctx->context);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -334,4 +334,4 @@ int coredumpViewer(const char *file) {
|
||||
|
||||
free(buffer);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -21,4 +21,4 @@
|
||||
|
||||
int coredumpViewer(const char *file);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
elf.c
2
elf.c
@ -189,4 +189,4 @@ char *uncompressBuffer(const Elf32_Ehdr *ehdr, const Elf32_Phdr *phdr, const seg
|
||||
buf += size;
|
||||
}
|
||||
return out;
|
||||
}
|
||||
}
|
||||
|
3
file.c
3
file.c
@ -178,7 +178,8 @@ int getFileSha1(const char *file, uint8_t *pSha1Out, FileProcessParam *param) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int getPathInfo(const char *path, uint64_t *size, uint32_t *folders, uint32_t *files, int (* handler)(const char *path)) {
|
||||
int getPathInfo(const char *path, uint64_t *size, uint32_t *folders,
|
||||
uint32_t *files, int (* handler)(const char *path)) {
|
||||
SceUID dfd = sceIoDopen(path);
|
||||
if (dfd >= 0) {
|
||||
int res = 0;
|
||||
|
9
hex.c
9
hex.c
@ -332,14 +332,17 @@ int hexViewer(const char *file) {
|
||||
// Character hex
|
||||
uint8_t high_nibble = (ch >> 4) & 0xF;
|
||||
uint8_t low_nibble = ch & 0xF;
|
||||
int w = pgf_draw_textf(HEX_OFFSET_X + (x * HEX_OFFSET_SPACE), START_Y + ((y + 1) * FONT_Y_SPACE), (on_line && nibble_x == nibble_pos) ? HEX_NIBBLE_COLOR : color, "%01X", high_nibble);
|
||||
pgf_draw_textf(HEX_OFFSET_X + (x * HEX_OFFSET_SPACE) + w, START_Y + ((y + 1) * FONT_Y_SPACE), (on_line && (nibble_x + 1) == nibble_pos) ? HEX_NIBBLE_COLOR : color, "%01X", low_nibble);
|
||||
int w = pgf_draw_textf(HEX_OFFSET_X + (x * HEX_OFFSET_SPACE), START_Y + ((y + 1) * FONT_Y_SPACE),
|
||||
(on_line && nibble_x == nibble_pos) ? HEX_NIBBLE_COLOR : color, "%01X", high_nibble);
|
||||
pgf_draw_textf(HEX_OFFSET_X + (x * HEX_OFFSET_SPACE) + w, START_Y + ((y + 1) * FONT_Y_SPACE),
|
||||
(on_line && (nibble_x + 1) == nibble_pos) ? HEX_NIBBLE_COLOR : color, "%01X", low_nibble);
|
||||
|
||||
// Character
|
||||
ch = (ch >= 0x20) ? ch : '.';
|
||||
int width = font_size_cache[(int)ch];
|
||||
uint8_t byte_nibble_pos = nibble_pos - (nibble_pos % 2);
|
||||
pgf_draw_textf(HEX_CHAR_X + (x * FONT_X_SPACE) + (FONT_X_SPACE - width) / 2.0f, START_Y + ((y + 1) * FONT_Y_SPACE), (on_line && nibble_x == byte_nibble_pos) ? HEX_NIBBLE_COLOR : color, "%c", ch);
|
||||
pgf_draw_textf(HEX_CHAR_X + (x * FONT_X_SPACE) + (FONT_X_SPACE - width) / 2.0f, START_Y + ((y + 1) * FONT_Y_SPACE),
|
||||
(on_line && nibble_x == byte_nibble_pos) ? HEX_NIBBLE_COLOR : color, "%c", ch);
|
||||
}
|
||||
|
||||
// Offset y
|
||||
|
@ -147,4 +147,4 @@ int updateImeDialog() {
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@ -31,4 +31,4 @@ const char *getImeDialogInitialText();
|
||||
int isImeDialogRunning();
|
||||
int updateImeDialog();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
init.h
2
init.h
@ -43,4 +43,4 @@ vita2d_pgf *loadSystemFonts();
|
||||
void initVitaShell();
|
||||
void finishVitaShell();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -381,7 +381,8 @@ static int exportMedia(char *path, uint32_t *songs, uint32_t *videos, uint32_t *
|
||||
PhotoExportParam param;
|
||||
memset(¶m, 0, sizeof(PhotoExportParam));
|
||||
param.version = 0x03150021;
|
||||
res = scePhotoExportFromFile(path, ¶m, buf, process_param ? process_param->cancelHandler : NULL, NULL, out, MAX_PATH_LENGTH);
|
||||
res = scePhotoExportFromFile(path, ¶m, buf, process_param ? process_param->cancelHandler : NULL,
|
||||
NULL, out, MAX_PATH_LENGTH);
|
||||
if (res < 0)
|
||||
return (res == 0x80101A0B) ? 0 : res;
|
||||
|
||||
@ -404,7 +405,8 @@ static int exportMedia(char *path, uint32_t *songs, uint32_t *videos, uint32_t *
|
||||
|
||||
MusicExportParam param;
|
||||
memset(¶m, 0, sizeof(MusicExportParam));
|
||||
res = sceMusicExportFromFile(path, ¶m, buf, process_param ? process_param->cancelHandler : NULL, musicExportProgress, &args, out, MAX_PATH_LENGTH);
|
||||
res = sceMusicExportFromFile(path, ¶m, buf, process_param ? process_param->cancelHandler : NULL,
|
||||
musicExportProgress, &args, out, MAX_PATH_LENGTH);
|
||||
if (res < 0)
|
||||
return (res == 0x8010530A) ? 0 : res;
|
||||
|
||||
@ -417,7 +419,8 @@ static int exportMedia(char *path, uint32_t *songs, uint32_t *videos, uint32_t *
|
||||
VideoExportOutputParam out_param;
|
||||
memset(&out_param, 0, sizeof(VideoExportOutputParam));
|
||||
|
||||
res = sceVideoExportFromFile(&in_param, 1, buf, process_param ? process_param->cancelHandler : NULL, NULL, NULL, 0, &out_param);
|
||||
res = sceVideoExportFromFile(&in_param, 1, buf, process_param ? process_param->cancelHandler : NULL,
|
||||
NULL, NULL, 0, &out_param);
|
||||
if (res < 0)
|
||||
return (res == 0x8010540A) ? 0 : res;
|
||||
|
||||
|
@ -278,7 +278,8 @@ void loadLanguage(int id) {
|
||||
};
|
||||
|
||||
// Load default config file
|
||||
readConfigBuffer(&_binary_resources_english_us_txt_start, (int)&_binary_resources_english_us_txt_size, language_entries, sizeof(language_entries) / sizeof(ConfigEntry));
|
||||
readConfigBuffer(&_binary_resources_english_us_txt_start, (int)&_binary_resources_english_us_txt_size,
|
||||
language_entries, sizeof(language_entries) / sizeof(ConfigEntry));
|
||||
|
||||
// Load custom config file
|
||||
if (use_custom_config) {
|
||||
|
2
main.c
2
main.c
@ -1970,7 +1970,7 @@ int main(int argc, const char *argv[]) {
|
||||
|
||||
// Automatic network update
|
||||
if (!vitashell_config.disable_autoupdate) {
|
||||
SceUID thid = sceKernelCreateThread("network_update_thread", (SceKernelThreadEntry)network_update_thread, 0x10000100, 0x100000, 0, 0, NULL);
|
||||
SceUID thid = sceKernelCreateThread("network_update_thread", network_update_thread, 0x10000100, 0x100000, 0, 0, NULL);
|
||||
if (thid >= 0)
|
||||
sceKernelStartThread(thid, 0, NULL);
|
||||
}
|
||||
|
@ -1230,4 +1230,3 @@ static int contextMenuNewEnterCallback(int sel, void *context) {
|
||||
|
||||
return CONTEXT_MENU_CLOSING;
|
||||
}
|
||||
|
||||
|
@ -38,4 +38,4 @@ void setContextMenuSortVisibilities();
|
||||
void setContextMenuMoreVisibilities();
|
||||
void setContextMenuNewVisibilities();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -29,4 +29,4 @@ typedef struct {
|
||||
|
||||
int compress_thread(SceSize args_size, CompressArguments *args);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -102,4 +102,4 @@ int updateMessageDialog() {
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@ -32,4 +32,4 @@ int initMessageDialog(int type, const char *msg, ...);
|
||||
int isMessageDialogRunning();
|
||||
int updateMessageDialog();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -302,4 +302,4 @@ int module_stop(SceSize args, void *argp) {
|
||||
taiHookReleaseForKernel(hookid, ksceSysrootIsSafeModeRef);
|
||||
|
||||
return SCE_KERNEL_STOP_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
@ -19,6 +19,7 @@ add_executable(usbdevice
|
||||
)
|
||||
|
||||
target_link_libraries(usbdevice
|
||||
SceUdcdForDriver_stub
|
||||
SceIofilemgrForDriver_stub
|
||||
SceSysclibForDriver_stub
|
||||
taihenForKernel_stub
|
||||
|
@ -80,6 +80,8 @@ int module_start(SceSize args, void *argp) {
|
||||
hooks[2] = taiHookFunctionImportForKernel(KERNEL_PID, &ksceIoReadRef, "SceUsbstorVStorDriver",
|
||||
0x40FD29C7, 0xE17EFC03, ksceIoReadPatched);
|
||||
|
||||
ksceUdcdStopCurrentInternal(2);
|
||||
|
||||
return SCE_KERNEL_START_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -71,4 +71,4 @@ int updateNetCheckDialog() {
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
@ -29,4 +29,4 @@ int initNetCheckDialog(int mode, int timeoutUs);
|
||||
int isNetCheckDialogRunning();
|
||||
int updateNetCheckDialog();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -275,4 +275,4 @@ EXIT:
|
||||
powerUnlock();
|
||||
|
||||
return sceKernelExitDeleteThread(0);
|
||||
}
|
||||
}
|
||||
|
@ -30,4 +30,4 @@ int getFieldFromHeader(const char *src, const char *field, const char **data, un
|
||||
int downloadFile(const char *src, const char *dst, FileProcessParam *param);
|
||||
int downloadFileProcess(const char *url, const char *dest, int successStep);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -22,4 +22,4 @@
|
||||
int network_update_thread(SceSize args, void *argp);
|
||||
int update_extract_thread(SceSize args, void *argp);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -37,4 +37,4 @@ int makeHeadBin();
|
||||
int installPackage(const char *file);
|
||||
int install_thread(SceSize args_size, InstallArguments *args);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
photo.c
2
photo.c
@ -362,4 +362,4 @@ int photoViewer(const char *file, int type, FileList *list, FileListEntry *entry
|
||||
free(buffer);
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
2
photo.h
2
photo.h
@ -39,4 +39,4 @@ enum PhotoModes {
|
||||
|
||||
int photoViewer(const char *file, int type, FileList *list, FileListEntry *entry, int *base_pos, int *rel_pos);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -462,4 +462,4 @@ void drawPropertyDialog() {
|
||||
sprintf(button_string, "%s %s", enter_button == SCE_SYSTEM_PARAM_ENTER_BUTTON_CIRCLE ? CIRCLE : CROSS, language_container[OK]);
|
||||
pgf_draw_text(ALIGN_CENTER(SCREEN_WIDTH, pgf_text_width(button_string)), string_y + FONT_Y_SPACE, DIALOG_COLOR, button_string);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -39,4 +39,4 @@ int initPropertyDialog(char *path, FileListEntry *entry);
|
||||
void propertyDialogCtrl();
|
||||
void drawPropertyDialog();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
psarc.c
2
psarc.c
@ -528,4 +528,4 @@ int psarcFileRead(SceUID fd, void *data, SceSize size) {
|
||||
|
||||
int psarcFileClose(SceUID fd) {
|
||||
return sceFiosFHCloseSync(NULL, fd);
|
||||
}
|
||||
}
|
||||
|
2
psarc.h
2
psarc.h
@ -34,4 +34,4 @@ int psarcFileClose(SceUID fd);
|
||||
int psarcClose();
|
||||
int psarcOpen(const char *file);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
qr.c
2
qr.c
@ -351,4 +351,4 @@ void setScannedQR(int s) {
|
||||
|
||||
int enabledQR() {
|
||||
return qr_enabled;
|
||||
}
|
||||
}
|
||||
|
2
qr.h
2
qr.h
@ -34,4 +34,4 @@ char *getLastQR();
|
||||
char *getLastDownloadQR();
|
||||
void setScannedQR(int scanned);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
10
settings.c
10
settings.c
@ -47,8 +47,8 @@ static int theme_count = 0;
|
||||
static char *theme_name = NULL;
|
||||
|
||||
static ConfigEntry settings_entries[] = {
|
||||
{ "USBDEVICE", CONFIG_TYPE_DECIMAL, (int *)&vitashell_config.usbdevice },
|
||||
{ "SELECT_BUTTON", CONFIG_TYPE_DECIMAL, (int *)&vitashell_config.select_button },
|
||||
{ "USBDEVICE", CONFIG_TYPE_DECIMAL, (int *)&vitashell_config.usbdevice },
|
||||
{ "SELECT_BUTTON", CONFIG_TYPE_DECIMAL, (int *)&vitashell_config.select_button },
|
||||
{ "DISABLE_AUTOUPDATE", CONFIG_TYPE_BOOLEAN, (int *)&vitashell_config.disable_autoupdate },
|
||||
};
|
||||
|
||||
@ -71,12 +71,12 @@ SettingsMenuOption main_settings[] = {
|
||||
|
||||
SettingsMenuOption power_settings[] = {
|
||||
{ VITASHELL_SETTINGS_REBOOT, SETTINGS_OPTION_TYPE_CALLBACK, (void *)rebootDevice, NULL, 0, NULL, 0, NULL },
|
||||
{ VITASHELL_SETTINGS_POWEROFF, SETTINGS_OPTION_TYPE_CALLBACK, (void *)shutdownDevice, NULL, 0, NULL, 0, NULL },
|
||||
{ VITASHELL_SETTINGS_STANDBY, SETTINGS_OPTION_TYPE_CALLBACK, (void *)suspendDevice, NULL, 0, NULL, 0, NULL },
|
||||
{ VITASHELL_SETTINGS_POWEROFF, SETTINGS_OPTION_TYPE_CALLBACK, (void *)shutdownDevice, NULL, 0, NULL, 0, NULL },
|
||||
{ VITASHELL_SETTINGS_STANDBY, SETTINGS_OPTION_TYPE_CALLBACK, (void *)suspendDevice, NULL, 0, NULL, 0, NULL },
|
||||
};
|
||||
|
||||
SettingsMenuEntry vitashell_settings_menu_entries[] = {
|
||||
{ VITASHELL_SETTINGS_MAIN, main_settings, sizeof(main_settings) / sizeof(SettingsMenuOption) },
|
||||
{ VITASHELL_SETTINGS_MAIN, main_settings, sizeof(main_settings) / sizeof(SettingsMenuOption) },
|
||||
{ VITASHELL_SETTINGS_POWER, power_settings, sizeof(power_settings) / sizeof(SettingsMenuOption) },
|
||||
};
|
||||
|
||||
|
@ -81,4 +81,4 @@ void settingsMenuCtrl();
|
||||
void settingsAgree();
|
||||
void settingsDisagree();
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
sfo.h
2
sfo.h
@ -50,4 +50,4 @@ int setSfoString(void *buffer, const char *name, const char *string);
|
||||
|
||||
int SFOReader(const char *file);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
text.h
2
text.h
@ -52,4 +52,4 @@ void initTextContextMenuWidth();
|
||||
|
||||
int textViewer(const char *file);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
3
theme.c
3
theme.c
@ -225,7 +225,8 @@ void loadTheme() {
|
||||
int i;
|
||||
|
||||
// Load default config file
|
||||
readConfigBuffer(&_binary_resources_default_colors_txt_start, (int)&_binary_resources_default_colors_txt_size, colors_entries, sizeof(colors_entries) / sizeof(ConfigEntry));
|
||||
readConfigBuffer(&_binary_resources_default_colors_txt_start, (int)&_binary_resources_default_colors_txt_size,
|
||||
colors_entries, sizeof(colors_entries) / sizeof(ConfigEntry));
|
||||
|
||||
// Load custom config file
|
||||
if (use_custom_config) {
|
||||
|
@ -281,8 +281,8 @@ int drawUncommonDialog() {
|
||||
// Dialog background
|
||||
vita2d_draw_texture_scale_rotate_hotspot(dialog_image, uncommon_dialog.x + uncommon_dialog.width / 2.0f,
|
||||
uncommon_dialog.y + uncommon_dialog.height / 2.0f,
|
||||
uncommon_dialog.scale * (uncommon_dialog.width/vita2d_texture_get_width(dialog_image)),
|
||||
uncommon_dialog.scale * (uncommon_dialog.height/vita2d_texture_get_height(dialog_image)),
|
||||
uncommon_dialog.scale * (uncommon_dialog.width / vita2d_texture_get_width(dialog_image)),
|
||||
uncommon_dialog.scale * (uncommon_dialog.height / vita2d_texture_get_height(dialog_image)),
|
||||
0.0f, vita2d_texture_get_width(dialog_image) / 2.0f, vita2d_texture_get_height(dialog_image) / 2.0f);
|
||||
|
||||
// Easing out
|
||||
@ -388,4 +388,4 @@ int drawUncommonDialog() {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -36,4 +36,4 @@ int drawUncommonDialog();
|
||||
// CUSTOM FUNCTION
|
||||
int sceMsgDialogProgressBarSetInfo(SceMsgDialogProgressBarTarget target, const SceChar8 *barInfo);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
2
usb.c
2
usb.c
@ -162,7 +162,7 @@ SceUID startUsb(const char *usbDevicePath, const char *imgFilePath, int type) {
|
||||
|
||||
// Stop MTP driver
|
||||
res = sceMtpIfStopDriver(1);
|
||||
if (res < 0)
|
||||
if (res < 0 && res != 0x8054360C)
|
||||
goto ERROR_STOP_DRIVER;
|
||||
|
||||
// Set device information
|
||||
|
2
usb.h
2
usb.h
@ -28,4 +28,4 @@ int umountUsbUx0();
|
||||
SceUID startUsb(const char *usbDevicePath, const char *imgFilePath, int type);
|
||||
int stopUsb(SceUID modid);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
8
utils.c
8
utils.c
@ -370,8 +370,12 @@ void getTimeString(char string[16], int time_format, SceDateTime *time) {
|
||||
|
||||
switch(time_format) {
|
||||
case SCE_SYSTEM_PARAM_TIME_FORMAT_12HR:
|
||||
snprintf(string, 16, "%02d:%02d %s", (time_local.hour > 12) ? (time_local.hour - 12) : ((time_local.hour == 0) ? 12 : time_local.hour), time_local.minute, time_local.hour >= 12 ? "PM" : "AM");
|
||||
{
|
||||
int hour = ((time_local.hour == 0) ? 12 : time_local.hour);
|
||||
snprintf(string, 16, "%02d:%02d %s", (time_local.hour > 12) ? (time_local.hour - 12) : hour,
|
||||
time_local.minute, time_local.hour >= 12 ? "PM" : "AM");
|
||||
break;
|
||||
}
|
||||
|
||||
case SCE_SYSTEM_PARAM_TIME_FORMAT_24HR:
|
||||
snprintf(string, 16, "%02d:%02d", time_local.hour, time_local.minute);
|
||||
@ -424,4 +428,4 @@ void remount(int id) {
|
||||
vshIoUmount(id, 0, 0, 0);
|
||||
vshIoUmount(id, 1, 0, 0);
|
||||
vshIoMount(id, NULL, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
2
utils.h
2
utils.h
@ -104,4 +104,4 @@ int vshIoMount(int id, const char *path, int permission, int a4, int a5, int a6)
|
||||
|
||||
void remount(int id);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -37,4 +37,4 @@ typedef struct {
|
||||
int disable_autoupdate;
|
||||
} VitaShellConfig;
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -36,4 +36,4 @@ enum VitaShellErrors {
|
||||
VITASHELL_ERROR_INVALID_TITLEID = 0xF0030000,
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user