diff options
author | 2020-08-30 17:08:25 +1000 | |
---|---|---|
committer | 2020-08-30 17:08:25 +1000 | |
commit | ec88949651e02a6d3558e7c38555f3473618c9cc (patch) | |
tree | 65689af57c49ccd881643be276f7f809c37aa87c /src/lib/formats/upd765_dsk.cpp | |
parent | 8cf55b23daffb1f565a510458331d0dc49e690dc (diff) |
formats: Get rid of more inappropriate use of emu_fatalerror (and fix some spelling issues, etc. while I'm at it)
Diffstat (limited to 'src/lib/formats/upd765_dsk.cpp')
-rw-r--r-- | src/lib/formats/upd765_dsk.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/lib/formats/upd765_dsk.cpp b/src/lib/formats/upd765_dsk.cpp index ee3fda0abda..4265aea6a36 100644 --- a/src/lib/formats/upd765_dsk.cpp +++ b/src/lib/formats/upd765_dsk.cpp @@ -10,8 +10,6 @@ #include "formats/upd765_dsk.h" -#include "emucore.h" // emu_fatalerror - upd765_format::upd765_format(const format *_formats) : file_header_skip_bytes(0), file_footer_skip_bytes(0), formats(_formats) { @@ -192,8 +190,7 @@ bool upd765_format::load(io_generic *io, uint32_t form_factor, floppy_image *ima int current_size; int end_gap_index; - switch (f.encoding) - { + switch(f.encoding) { case floppy_image::FM: desc = get_desc_fm(f, current_size, end_gap_index); break; @@ -205,8 +202,10 @@ bool upd765_format::load(io_generic *io, uint32_t form_factor, floppy_image *ima int total_size = 200000000/f.cell_size; int remaining_size = total_size - current_size; - if(remaining_size < 0) - throw emu_fatalerror("upd765_format: Incorrect track layout, max_size=%d, current_size=%d", total_size, current_size); + if(remaining_size < 0) { + osd_printf_error("upd765_format: Incorrect track layout, max_size=%d, current_size=%d\n", total_size, current_size); + return false; + } // Fixup the end gap desc[end_gap_index].p2 = remaining_size / 16; |