Improved file-talk message

This commit is contained in:
neauoire 2021-07-11 18:55:09 -07:00
parent ced41f6d70
commit c41ba2b1e2
1 changed files with 1 additions and 1 deletions

View File

@ -272,7 +272,7 @@ file_talk(Device *d, Uint8 b0, Uint8 w)
Uint16 addr = mempeek16(d->dat, b0 - 1); Uint16 addr = mempeek16(d->dat, b0 - 1);
FILE *f = fopen(name, read ? "r" : (offset ? "a" : "w")); FILE *f = fopen(name, read ? "r" : (offset ? "a" : "w"));
if(f) { if(f) {
fprintf(stderr, "%s %04x %s %s: ", read ? "Loading" : "Saving", addr, read ? "from" : "to", name); fprintf(stderr, "%s %s %s #%04x, ", read ? "Loading" : "Saving", name, read ? "to" : "from", addr);
if(fseek(f, offset, SEEK_SET) != -1) if(fseek(f, offset, SEEK_SET) != -1)
result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f); result = read ? fread(&d->mem[addr], 1, length, f) : fwrite(&d->mem[addr], 1, length, f);
fprintf(stderr, "%04x bytes\n", result); fprintf(stderr, "%04x bytes\n", result);