diff options
author | 2023-04-14 06:45:20 +1000 | |
---|---|---|
committer | 2023-04-14 06:45:20 +1000 | |
commit | 7d26d641d3e94943b351ad55d7ffe25ec02ac791 (patch) | |
tree | d9fabd7ddf5c487711b1ee6b5599d0e4a7cb5902 /src/osd/modules/debugger/win/consolewininfo.cpp | |
parent | c0b57d30f0ce39c445190fe4e27bec6c57ebb137 (diff) |
Miscellaneous improvements:
infoxml.cpp: Thread device processing. Gives about a 10% speed
improvement overall, and avoids the need to mess with the locale of the
ultimate output stream.
debugger/win/consolewininfo.cpp: Show image mount/create error messages
on the console.
emu/devdelegate.h, util/delegate.h: Added deduction guides for common
delegate creation patterns (only used in sega/segas16a.cpp so far).
More noexcept on things that have no business throwing exceptions.
Diffstat (limited to 'src/osd/modules/debugger/win/consolewininfo.cpp')
-rw-r--r-- | src/osd/modules/debugger/win/consolewininfo.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/osd/modules/debugger/win/consolewininfo.cpp b/src/osd/modules/debugger/win/consolewininfo.cpp index 1c70cb8e7a0..3a4a52be2e2 100644 --- a/src/osd/modules/debugger/win/consolewininfo.cpp +++ b/src/osd/modules/debugger/win/consolewininfo.cpp @@ -556,9 +556,11 @@ void consolewin_info::open_image_file(device_image_interface &device) window(), CLSID_FileOpenDialog, true, - [&device] (std::string_view selection) + [this, &device] (std::string_view selection) { - device.load(selection); + auto [err, message] = device.load(selection); + if (err) + machine().debugger().console().printf("Error mounting image file: %s\n", !message.empty() ? message : err.message()); }); } @@ -570,9 +572,11 @@ void consolewin_info::create_image_file(device_image_interface &device) window(), CLSID_FileSaveDialog, false, - [&device] (std::string_view selection) + [this, &device] (std::string_view selection) { - device.create(selection, device.device_get_indexed_creatable_format(0), nullptr); + auto [err, message] = device.create(selection, device.device_get_indexed_creatable_format(0), nullptr); + if (err) + machine().debugger().console().printf("Error creating image file: %s\n", !message.empty() ? message : err.message()); }); } |