Skip to content

Commit 950f434

Browse files
committed
IRISMAN 4.87.1
Dump bluray disc now includes game title in the output folder name #34
1 parent 24bbce3 commit 950f434

File tree

4 files changed

+48
-26
lines changed

4 files changed

+48
-26
lines changed

include/utils.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,8 @@ void call_webman(const char *cmd);
226226

227227
void urldec(char *url);
228228
u64 string_to_ull( char *string );
229+
void fixpath(char *p);
230+
void fixtitle(char *p);
229231

230232
unsigned int get_vsh_plugin_slot_by_name(const char *name);
231233
unsigned int get_vsh_plugin_free_slot(void);

source/iso.c

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2366,7 +2366,7 @@ static int build_file_iso(int *fd, char *path1, char *path2, int level)
23662366

23672367
}
23682368

2369-
static void fixpath(char *p)
2369+
void fixpath(char *p)
23702370
{
23712371
u8 * pp = (u8 *) p;
23722372

@@ -2397,7 +2397,7 @@ static void fixpath(char *p)
23972397

23982398
}
23992399

2400-
static void fixtitle(char *p)
2400+
void fixtitle(char *p)
24012401
{
24022402
while(*p)
24032403
{
@@ -2457,26 +2457,29 @@ int makeps3iso(char *g_path, char *f_iso, int split)
24572457
strcpy(path2, path1);
24582458
strcat(path2, "/PS3_GAME/PARAM.SFO");
24592459

2460-
if(strstr(path1, "/GAME") == NULL)
2461-
{
2462-
path2[64] = 0;
2463-
strcpy(path2, strrchr(path1, '/') + 1);
2464-
path2[40] = 0;
2465-
}
2466-
else
24672460
if(iso_parse_param_sfo(path2, title_id, output_name) < 0)
24682461
{
2469-
DPrintf("ERROR: PARAM.SFO not found!\n");
2470-
press_button_to_continue();
2471-
return FAILED;
2462+
if(strstr(path1, "/GAME") == NULL)
2463+
{
2464+
path2[64] = 0;
2465+
strcpy(path2, strrchr(path1, '/') + 1);
2466+
path2[40] = 0;
2467+
}
2468+
else
2469+
{
2470+
DPrintf("ERROR: PARAM.SFO not found!\n");
2471+
press_button_to_continue();
2472+
return FAILED;
2473+
}
24722474
}
24732475
else
24742476
{
24752477
utf8_to_ansiname(output_name, path2, 32);
24762478
path2[32]= 0;
24772479
fixtitle(path2);
2478-
strcat(path2, "-");
2480+
strcat(path2, " [");
24792481
strcat(path2, title_id);
2482+
strcat(path2, "]");
24802483
}
24812484

24822485
if(f_iso) strcpy(output_name, f_iso); else output_name[0] = 0;
@@ -2496,12 +2499,10 @@ int makeps3iso(char *g_path, char *f_iso, int split)
24962499
if(nlen < 1) {strcpy(output_name, path2);/*DPrintf("ISO name too short!\n"); press_button_to_continue(); return FAILED;*/}
24972500
else
24982501
{
2499-
25002502
if(stat(output_name, &s) == 0 && (S_ISDIR(s.st_mode)))
25012503
{
25022504
strcat(output_name, "/"); strcat(output_name, path2);
25032505
}
2504-
25052506
}
25062507

25072508
nlen = strlen(output_name);

source/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6150,7 +6150,7 @@ int gui_control()
61506150
DrawDialogOKTimer(language[DRAWSCREEN_PARCONTROL], 2000.0f);
61516151
else
61526152
{
6153-
// if(old_pad & BUTTON_SELECT) {bShowVersion = 1; bShowPIC1 = 1;} // SELECT + /\ = force show version / pic1 on ISO
6153+
if(old_pad & BUTTON_SELECT) {bShowVersion = 1; bShowPIC1 = 1;} // SELECT + /\ = force show version / pic1 on ISO
61546154

61556155
i = selected;
61566156
app_ver[0] = 0;

source/utils.c

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,14 +1924,24 @@ void copy_from_bluray()
19241924
{
19251925
sprintf(name, "/%s/" __MKDEF_GAMES_DIR, hdd_folder);
19261926
mkdir_secure(name);
1927-
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s", hdd_folder, id);
1927+
char game_title[64];
1928+
strcpy(game_title, bluray_game); fixtitle(game_title);
1929+
if(*game_title)
1930+
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s [%s]", hdd_folder, game_title, id);
1931+
else
1932+
sprintf(name, "/%s/" __MKDEF_GAMES_DIR "/%s", hdd_folder, id);
19281933
mkdir_secure(name);
19291934
}
19301935
else if (!memcmp(hdd_folder, "GAMES", 6) || !memcmp(hdd_folder, "dev_hdd0_2", 11))
19311936
{
19321937
sprintf(name, "/%s/GAMES", "dev_hdd0");
19331938
mkdir_secure(name);
1934-
sprintf(name, "/%s/GAMES/%s", "dev_hdd0", id);
1939+
char game_title[64];
1940+
strcpy(game_title, bluray_game); fixtitle(game_title);
1941+
if(*game_title)
1942+
sprintf(name, "/%s/GAMES/%s [%s]", "dev_hdd0", game_title, id);
1943+
else
1944+
sprintf(name, "/%s/GAMES/%s", "dev_hdd0", id);
19351945
mkdir_secure(name);
19361946
}
19371947
else
@@ -1948,12 +1958,24 @@ void copy_from_bluray()
19481958
{
19491959
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR, 47 + curr_device);
19501960
mkdir_secure(name);
1951-
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR, 47 + curr_device);
1952-
mkdir_secure(name);
1953-
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s", 47 + curr_device, id);
1961+
char game_title[64];
1962+
strcpy(game_title, bluray_game); fixtitle(game_title);
1963+
if(*game_title)
1964+
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s [%s]", 47 + curr_device, game_title, id);
1965+
else
1966+
sprintf(name, "/dev_usb00%c/" __MKDEF_GAMES_DIR "/%s", 47 + curr_device, id);
19541967
mkdir_secure(name);
19551968
}
19561969

1970+
if(*bluray_game)
1971+
{
1972+
strcat(progress_bar_title, "\n");
1973+
strcat(progress_bar_title, bluray_game);
1974+
strcat(progress_bar_title, "[");
1975+
strcat(progress_bar_title, id);
1976+
strcat(progress_bar_title, "]");
1977+
}
1978+
19571979
time_start = time(NULL);
19581980
abort_copy = 0;
19591981
DCls();
@@ -2029,15 +2051,14 @@ void copy_from_bluray()
20292051
new_pad = 0;
20302052
break;
20312053
}
2032-
20332054
}
20342055

20352056
if(abort_copy)
20362057
{
20372058
if(curr_device == 0)
2038-
sprintf(filename, "%s\n\n%s HDD0?", id, language[GAMECPYSL_FAILDELDUMP]);
2059+
sprintf(filename, "%s [%s]\n\n%s HDD0?", bluray_game, id, language[GAMECPYSL_FAILDELDUMP]);
20392060
else
2040-
sprintf(filename, "%s\n\n%s USB00%c?", id, language[GAMECPYSL_FAILDELDUMP], 47 + curr_device);
2061+
sprintf(filename, "%s [%s]\n\n%s USB00%c?", bluray_game, id, language[GAMECPYSL_FAILDELDUMP], 47 + curr_device);
20412062

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

20542075
rmdir_secure((char *) name); // delete this folder
2055-
20562076
}
20572077
else
20582078
{
@@ -2072,7 +2092,6 @@ void copy_from_bluray()
20722092
ret =
20732093
#endif
20742094
sysLv2FsRename(name, filename);
2075-
20762095
}
20772096
}
20782097
}

0 commit comments

Comments
 (0)