From 282534d7bca52e1a4919722cf34fdcc25a21df11 Mon Sep 17 00:00:00 2001 From: Flyinghead Date: Mon, 22 Oct 2018 17:39:02 +0200 Subject: [PATCH] cdi, chd: better error messages --- core/imgread/chd.cpp | 5 ++++- core/imgread/common.cpp | 5 +++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/imgread/chd.cpp b/core/imgread/chd.cpp index df9bd45c9..09abfa1ce 100644 --- a/core/imgread/chd.cpp +++ b/core/imgread/chd.cpp @@ -69,7 +69,10 @@ bool CHDDisc::TryOpen(const wchar* file) chd_error err=chd_open(file,CHD_OPEN_READ,0,&chd); if (err!=CHDERR_NONE) + { + printf("chd: chd_open failed for file %s: %d\n", file, err); return false; + } printf("chd: parsing file %s\n",file); @@ -164,4 +167,4 @@ Disc* chd_parse(const wchar* file) delete rv; return 0; } -} \ No newline at end of file +} diff --git a/core/imgread/common.cpp b/core/imgread/common.cpp index 90f79e549..2e60831bf 100644 --- a/core/imgread/common.cpp +++ b/core/imgread/common.cpp @@ -137,8 +137,9 @@ Disc* OpenDisc(const wchar* fn) rv = drivers[i](fn); if (rv && cdi_parse == drivers[i]) { - const wchar warn_str[] = "Warning: CDI Image Loaded!\n Many CDI images are known to be defective, GDI or CHD format is preferred. Please only file bug reports when using images known to be good (GDI or CHD)."; - printf(warn_str); + const wchar warn_str[] = "Warning: CDI Image Loaded!\n Many CDI images are known to be defective, GDI or CHD format is preferred. " + "Please only file bug reports when using images known to be good (GDI or CHD)."; + printf("%s\n", warn_str); break; }