mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-10 22:18:02 +00:00
Integrated LogVisor for error gathering
This commit is contained in:
11
lib/NOD.cpp
11
lib/NOD.cpp
@@ -4,6 +4,9 @@
|
||||
|
||||
namespace NOD
|
||||
{
|
||||
|
||||
LogVisor::LogModule LogModule("NODLib");
|
||||
|
||||
std::unique_ptr<IDiscIO> NewDiscIOISO(const SystemChar* path);
|
||||
std::unique_ptr<IDiscIO> NewDiscIOWBFS(const SystemChar* path);
|
||||
|
||||
@@ -18,9 +21,9 @@ std::unique_ptr<DiscBase> OpenDiscFromImage(const SystemChar* path, bool& isWii)
|
||||
if (!fp)
|
||||
{
|
||||
#if NOD_UCS2
|
||||
fwprintf(stderr, L"Unable to open '%s'\n", path);
|
||||
LogModule.report(LogVisor::Error, L"Unable to open '%s'\n", path);
|
||||
#else
|
||||
fprintf(stderr, "Unable to open '%s'\n", path);
|
||||
LogModule.report(LogVisor::Error, "Unable to open '%s'\n", path);
|
||||
#endif
|
||||
return std::unique_ptr<DiscBase>();
|
||||
}
|
||||
@@ -63,9 +66,9 @@ std::unique_ptr<DiscBase> OpenDiscFromImage(const SystemChar* path, bool& isWii)
|
||||
if (!discIO)
|
||||
{
|
||||
#if NOD_UCS2
|
||||
fwprintf(stderr, L"'%s' is not a valid image\n", path);
|
||||
LogModule.report(LogVisor::Error, L"'%s' is not a valid image\n", path);
|
||||
#else
|
||||
fprintf(stderr, "'%s' is not a valid image\n", path);
|
||||
LogModule.report(LogVisor::Error, "'%s' is not a valid image\n", path);
|
||||
#endif
|
||||
return std::unique_ptr<DiscBase>();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user