PSX: don't create memory card till first save.

This commit is contained in:
Sorgelig
2022-02-13 23:16:30 +08:00
parent 7d896cd85a
commit eb1455cebb
4 changed files with 27 additions and 27 deletions

View File

@@ -1674,7 +1674,7 @@ void user_io_file_info(const char *ext)
DisableFpga();
}
int user_io_file_mount(const char *name, unsigned char index, char pre)
int user_io_file_mount(const char *name, unsigned char index, char pre, int pre_size)
{
int writable = 0;
int ret = 0;
@@ -1764,6 +1764,7 @@ int user_io_file_mount(const char *name, unsigned char index, char pre)
{
sd_image[index].type = 2;
strcpy(sd_image[index].path, name);
size = pre_size;
}
if (io_ver)
@@ -2820,6 +2821,10 @@ void user_io_poll()
memcpy(buffer[disk], "HUBM\x00\x88\x10\x80", 8);
}
}
else if (is_psx())
{
psx_fill_blanksave(buffer[disk], lba, blks);
}
else
{
memset(buffer[disk], -1, sizeof(buffer[disk]));