Skip to content

Commit

Permalink
forbid formatting internal HDD on PSX DESR Console (#59)
Browse files Browse the repository at this point in the history
mostly because some noobs format the HDD on PSX while game area is not expanded, resulting in hdd damage because program made partitions wich a size that doesnt fit APA standards (partition sizes wich are not a multiple of 128mb)
  • Loading branch information
israpps committed Oct 23, 2023
1 parent 3653259 commit 945d787
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/hdd.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ int MenuParty(PARTYINFO Info)
unmountParty(1); //unconditionally unmount secondary mountpoint

memset(enable, TRUE, NUM_MENU);
if (console_is_PSX) {
enable[FORMAT] = FALSE;
}

if ((Info.Name[0] == '_') && (Info.Name[1] == '_')) {
enable[REMOVE] = FALSE;
Expand Down
5 changes: 3 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2551,9 +2551,10 @@ int main(int argc, char *argv[])

Reset();
Init_Default_Language();
if (exists("rom0:PSXVER"))
if (exists("rom0:PSXVER")) {
console_is_PSX = 1;
DPRINTF("is PSX = %d\n", console_is_PSX);
DPRINTF("# Console is PSX-DESR\n");
}
LaunchElfDir[0] = 0;
boot_path[0] = 0;

Expand Down

0 comments on commit 945d787

Please sign in to comment.