mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
troubleshooter: diagnose ddr codec issues (#503)
## Link to GitHub Issue, if one exists #345 ## Description of change Turn existing warnings for DDR codec issues into deferred error messages. ## Testing Tested DDR World with faked codec issues.
This commit is contained in:
@@ -8,6 +8,7 @@
|
|||||||
#include "hooks/setupapihook.h"
|
#include "hooks/setupapihook.h"
|
||||||
#include "hooks/sleephook.h"
|
#include "hooks/sleephook.h"
|
||||||
#include "hooks/input/dinput8/hook.h"
|
#include "hooks/input/dinput8/hook.h"
|
||||||
|
#include "util/deferlog.h"
|
||||||
#include "util/utils.h"
|
#include "util/utils.h"
|
||||||
#include "util/libutils.h"
|
#include "util/libutils.h"
|
||||||
#include "util/fileutils.h"
|
#include "util/fileutils.h"
|
||||||
@@ -108,18 +109,32 @@ namespace games::ddr {
|
|||||||
log_info("ddr", "`{}` returned {}", cmd, result);
|
log_info("ddr", "`{}` returned {}", cmd, result);
|
||||||
} else {
|
} else {
|
||||||
log_warning("ddr", "`{}` failed, returned {}", cmd, result);
|
log_warning("ddr", "`{}` failed, returned {}", cmd, result);
|
||||||
|
deferredlogs::defer_error_messages({
|
||||||
|
"DDR codec registration failure",
|
||||||
|
fmt::format(" {} failed to register with error {}", filename.string(), result)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static std::once_flag printed;
|
||||||
|
std::call_once(printed, [file]() {
|
||||||
if (!contains_only_ascii(file.path().string())) {
|
if (!contains_only_ascii(file.path().string())) {
|
||||||
log_warning(
|
log_warning(
|
||||||
"ddr",
|
"ddr",
|
||||||
"BAD PATH ERROR\n\n\n"
|
"BAD PATH ERROR\n\n"
|
||||||
"!!! !!!\n"
|
"!!! !!!\n"
|
||||||
"!!! filesystem path to codec contains non-ASCII characters! !!!\n"
|
"!!! filesystem path to codec contains non-ASCII characters! !!!\n"
|
||||||
"!!! this may cause the game to crash! !!!\n"
|
"!!! this may cause failures when loading codecs, and !!!\n"
|
||||||
|
"!!! potentially leading the game to crash! !!!\n"
|
||||||
"!!! !!!\n"
|
"!!! !!!\n"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
deferredlogs::defer_error_messages({
|
||||||
|
"path to DDR codecs contain non-Latin characters",
|
||||||
|
" this may lead to movies not playing, white screen issue,",
|
||||||
|
" game hanging, or potentially a crash",
|
||||||
|
" move the game to a directory that does not contain non-Latin characters",
|
||||||
|
" if you encountered any issues"});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user