troubleshooter: add more detection (#397)

## Description of change
Detect and log troubleshooter messages for:

* (early) hook DLL load failure
* data_mods folder without ifs_hook.dll
* spice version (print out current version and add a link to github
download)

## Testing
This commit is contained in:
bicarus-dev
2025-10-06 08:03:06 -07:00
committed by GitHub
parent 8cc00c371a
commit 58ea6ce17e
3 changed files with 48 additions and 19 deletions
+8 -2
View File
@@ -283,7 +283,8 @@ static inline std::string get_last_error_string() {
LPSTR messageBuffer = nullptr;
size_t size = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
FORMAT_MESSAGE_IGNORE_INSERTS |
FORMAT_MESSAGE_MAX_WIDTH_MASK,
nullptr,
error,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
@@ -292,7 +293,12 @@ static inline std::string get_last_error_string() {
nullptr);
// return as string
std::string message(messageBuffer, size);
std::string message;
if (size == 0) {
message = fmt::format("(Win32 error {})", error);
} else {
message = fmt::format("{}(Win32 error {})", messageBuffer, error);
}
LocalFree(messageBuffer);
return message;