Skip to content

Commit

Permalink
Merge pull request #90 from Alann-Mints/master
Browse files Browse the repository at this point in the history
Added Rebuild Database and improved .. detection in exFAT Manager
  • Loading branch information
aldostools authored Feb 19, 2023
2 parents 2838641 + 4061d14 commit e08a6ad
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion fm_exFAT/source/fm.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ int fm_panel_enter (struct fm_panel *p)
char np[CBSIZE];
if (p->path)
{
if (!strncmp(p->current->name, "..", 2)/*p->current_idx == 0*/) { fm_panel_exit (p); return 0; }
if (strlen(p->current->name) == 2 && !strncmp(p->current->name, "..", 2)) { fm_panel_exit (p); return 0; }
if (p->current && p->current->name && *(p->current->name))
snprintf (np, CBSIZE, "%s/%s", p->path, p->current->name);
else
Expand Down
26 changes: 19 additions & 7 deletions source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9136,8 +9136,9 @@ void draw_gbloptions(float x, float y)
(net_option == 9) ? "Showtime" :
(net_option == 10) ? "Internet Browser" :
(net_option == 11) ? (file_exists("/dev_blind") ? "/dev_blind : ON" : "/dev_blind : OFF") :
(net_option == 12) ? language[DRAWSCREEN_SHUTDOWN] :
(net_option == 13) ? language[DRAWSCREEN_RESTART] : "", bSelected);
(net_option == 12) ? "Rebuild Database" :
(net_option == 13) ? language[DRAWSCREEN_SHUTDOWN] :
(net_option == 14) ? language[DRAWSCREEN_RESTART] : "", bSelected);

y2+= 48;

Expand Down Expand Up @@ -9429,7 +9430,7 @@ void draw_gbloptions(float x, float y)

if(file_exists(tmp_path) == false)
{
DrawDialogOKTimer("webMAN is not currently installed. The latest version won't be downloaded.", 3000.0f);
DrawDialogOKTimer("webMAN is not currently installed. The latest version won't be downloaded.", 3500.0f);
break;
}
/*
Expand Down Expand Up @@ -9535,7 +9536,18 @@ void draw_gbloptions(float x, float y)

break;

case 12: // Shutdown PS3
case 12: // Rebuild Database
if(DrawDialogYesNo("Are you sure you want to restart the PS3 and rebuild the database?") == YES)
{
SaveGameList();
fun_exit();
int database_rebuild = 0x000003E9;
SaveFile("/dev_hdd0/mms/db.err", (char*)&database_rebuild, 4);
lv2syscall4(SC_SYS_POWER,SYS_HARD_REBOOT,0,0,0);
}
break;

case 13: // Shutdown PS3
SaveGameList();

set_install_pkg = false;
Expand All @@ -9544,7 +9556,7 @@ void draw_gbloptions(float x, float y)
sys_shutdown();
break;

case 13: // Restart PS3
case 14: // Restart PS3
reboot:
SaveGameList();

Expand Down Expand Up @@ -9778,7 +9790,7 @@ void draw_gbloptions(float x, float y)

if(new_pad & (BUTTON_LEFT))
{
ROT_DEC(net_option, 0, 13)
ROT_DEC(net_option, 0, 14)
if (net_option == 6 && !bAllowNetGames) net_option = 0;
if(net_option == 8 && file_exists("/dev_flash/sys/stage2.bin") == false
&& file_exists("/dev_flash/sys/stage2_disabled.bin") == false
Expand All @@ -9787,7 +9799,7 @@ void draw_gbloptions(float x, float y)
}
else if(new_pad & (BUTTON_RIGHT))
{
ROT_INC(net_option, 13, 0)
ROT_INC(net_option, 14, 0)
if (net_option == 1 && !bAllowNetGames) net_option = 7;
if(net_option == 8 && file_exists("/dev_flash/sys/stage2.bin") == false
&& file_exists("/dev_flash/sys/stage2_disabled.bin") == false
Expand Down

0 comments on commit e08a6ad

Please sign in to comment.