Skip to content

Commit

Permalink
IRISMAN 4.87.1
Browse files Browse the repository at this point in the history
Dump bluray disc now includes game title in the output folder name #34
  • Loading branch information
aldostools committed May 11, 2021
1 parent 24bbce3 commit 950f434
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 26 deletions.
2 changes: 2 additions & 0 deletions include/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ void call_webman(const char *cmd);

void urldec(char *url);
u64 string_to_ull( char *string );
void fixpath(char *p);
void fixtitle(char *p);

unsigned int get_vsh_plugin_slot_by_name(const char *name);
unsigned int get_vsh_plugin_free_slot(void);
Expand Down
31 changes: 16 additions & 15 deletions source/iso.c
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,7 @@ static int build_file_iso(int *fd, char *path1, char *path2, int level)

}

static void fixpath(char *p)
void fixpath(char *p)
{
u8 * pp = (u8 *) p;

Expand Down Expand Up @@ -2397,7 +2397,7 @@ static void fixpath(char *p)

}

static void fixtitle(char *p)
void fixtitle(char *p)
{
while(*p)
{
Expand Down Expand Up @@ -2457,26 +2457,29 @@ int makeps3iso(char *g_path, char *f_iso, int split)
strcpy(path2, path1);
strcat(path2, "/PS3_GAME/PARAM.SFO");

if(strstr(path1, "/GAME") == NULL)
{
path2[64] = 0;
strcpy(path2, strrchr(path1, '/') + 1);
path2[40] = 0;
}
else
if(iso_parse_param_sfo(path2, title_id, output_name) < 0)
{
DPrintf("ERROR: PARAM.SFO not found!\n");
press_button_to_continue();
return FAILED;
if(strstr(path1, "/GAME") == NULL)
{
path2[64] = 0;
strcpy(path2, strrchr(path1, '/') + 1);
path2[40] = 0;
}
else
{
DPrintf("ERROR: PARAM.SFO not found!\n");
press_button_to_continue();
return FAILED;
}
}
else
{
utf8_to_ansiname(output_name, path2, 32);
path2[32]= 0;
fixtitle(path2);
strcat(path2, "-");
strcat(path2, " [");
strcat(path2, title_id);
strcat(path2, "]");
}

if(f_iso) strcpy(output_name, f_iso); else output_name[0] = 0;
Expand All @@ -2496,12 +2499,10 @@ int makeps3iso(char *g_path, char *f_iso, int split)
if(nlen < 1) {strcpy(output_name, path2);/*DPrintf("ISO name too short!\n"); press_button_to_continue(); return FAILED;*/}
else
{

if(stat(output_name, &s) == 0 && (S_ISDIR(s.st_mode)))
{
strcat(output_name, "/"); strcat(output_name, path2);
}

}

nlen = strlen(output_name);
Expand Down
2 changes: 1 addition & 1 deletion source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -6150,7 +6150,7 @@ int gui_control()
DrawDialogOKTimer(language[DRAWSCREEN_PARCONTROL], 2000.0f);
else
{
// if(old_pad & BUTTON_SELECT) {bShowVersion = 1; bShowPIC1 = 1;} // SELECT + /\ = force show version / pic1 on ISO
if(old_pad & BUTTON_SELECT) {bShowVersion = 1; bShowPIC1 = 1;} // SELECT + /\ = force show version / pic1 on ISO

i = selected;
app_ver[0] = 0;
Expand Down
39 changes: 29 additions & 10 deletions source/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,14 +1924,24 @@ void copy_from_bluray()
{
sprintf(name, "/%s/" __MKDEF_GAMES_DIR, hdd_folder);
mkdir_secure(name);
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s", hdd_folder, id);
char game_title[64];
strcpy(game_title, bluray_game); fixtitle(game_title);
if(*game_title)
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s [%s]", hdd_folder, game_title, id);
else
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s", hdd_folder, id);
mkdir_secure(name);
}
else if (!memcmp(hdd_folder, "GAMES", 6) || !memcmp(hdd_folder, "dev_hdd0_2", 11))
{
sprintf(name, "/%s/GAMES", "dev_hdd0");
mkdir_secure(name);
sprintf(name, "/%s/GAMES/%s", "dev_hdd0", id);
char game_title[64];
strcpy(game_title, bluray_game); fixtitle(game_title);
if(*game_title)
sprintf(name, "/%s/GAMES/%s [%s]", "dev_hdd0", game_title, id);
else
sprintf(name, "/%s/GAMES/%s", "dev_hdd0", id);
mkdir_secure(name);
}
else
Expand All @@ -1948,12 +1958,24 @@ void copy_from_bluray()
{
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR, 47 + curr_device);
mkdir_secure(name);
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR, 47 + curr_device);
mkdir_secure(name);
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s", 47 + curr_device, id);
char game_title[64];
strcpy(game_title, bluray_game); fixtitle(game_title);
if(*game_title)
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s [%s]", 47 + curr_device, game_title, id);
else
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s", 47 + curr_device, id);
mkdir_secure(name);
}

if(*bluray_game)
{
strcat(progress_bar_title, "\n");
strcat(progress_bar_title, bluray_game);
strcat(progress_bar_title, "[");
strcat(progress_bar_title, id);
strcat(progress_bar_title, "]");
}

time_start = time(NULL);
abort_copy = 0;
DCls();
Expand Down Expand Up @@ -2029,15 +2051,14 @@ void copy_from_bluray()
new_pad = 0;
break;
}

}

if(abort_copy)
{
if(curr_device == 0)
sprintf(filename, "%s\n\n%s HDD0?", id, language[GAMECPYSL_FAILDELDUMP]);
sprintf(filename, "%s [%s]\n\n%s HDD0?", bluray_game, id, language[GAMECPYSL_FAILDELDUMP]);
else
sprintf(filename, "%s\n\n%s USB00%c?", id, language[GAMECPYSL_FAILDELDUMP], 47 + curr_device);
sprintf(filename, "%s [%s]\n\n%s USB00%c?", bluray_game, id, language[GAMECPYSL_FAILDELDUMP], 47 + curr_device);

dialog_action = 0;
msgDialogOpen2(mdialogyesno, filename, my_dialog, (void*) 0x0000aaaa, NULL );
Expand All @@ -2052,7 +2073,6 @@ void copy_from_bluray()
my_game_delete((char *) name);

rmdir_secure((char *) name); // delete this folder

}
else
{
Expand All @@ -2072,7 +2092,6 @@ void copy_from_bluray()
ret =
#endif
sysLv2FsRename(name, filename);

}
}
}
Expand Down

0 comments on commit 950f434

Please sign in to comment.