Update to spice2x-26-02-17 (pre-apply)

> broken commit
This commit is contained in:
[ ]
2026-02-19 15:41:42 +09:00
parent 04fc516d47
commit e923b7918f
211 changed files with 26313 additions and 19055 deletions
+39 -7
View File
@@ -12,17 +12,36 @@ namespace deferredlogs {
" this crash is most likely related to audio init failure",
" * check if the default audio device has changed",
" * fix your audio device settings (e.g., sample rate)",
" * double check your spice audio options and patches"
" * double check your spice audio options and patches",
" * ensure no other application is using the device in exclusive mode"
};
std::mutex deferred_errors_mutex;
std::vector<std::vector<std::string>> deferred_errors;
std::mutex softid_mutex;
std::string softid;
void set_softid(const std::string& softid_new) {
std::lock_guard<std::mutex> lock(softid_mutex);
softid = softid_new;
}
void defer_error_messages(std::initializer_list<std::string> messages) {
std::lock_guard<std::mutex> lock(deferred_errors_mutex);
deferred_errors.emplace_back(messages);
}
void report_fatal_message() {
static std::once_flag printed;
std::call_once(printed, []() {
deferredlogs::defer_error_messages({
"game reported FATAL error(s)",
" look for messages containing F: in the log",
});
});
}
void dump_to_logger(bool is_crash) {
static std::once_flag printed;
std::call_once(printed, [is_crash]() {
@@ -45,17 +64,30 @@ namespace deferredlogs {
msg += "/-------------------------- spice2x auto-troubleshooter -----------------------\\\n";
msg += "\n";
msg += " spice2x version: " + to_string(VERSION_STRING_CFG) + "\n";
// soft ID
{
std::lock_guard<std::mutex> lock(softid_mutex);
if (!softid.empty()) {
msg += " game version: " + softid + "\n";
} else {
msg += " game version: unknown\n";
}
}
msg += "\n";
if (is_crash) {
msg += " the game has crashed\n";
msg += " share this entire log file with someone for troubleshooting (log.txt)\n";
msg += " spice will also attempt to create a minidump (minidump.dmp)\n";
msg += " * share this entire log file with someone for troubleshooting (log.txt)\n";
msg += " * spice will also attempt to create a minidump (minidump.dmp)\n";
msg += " minidump should only be shared with people you trust as it may contain\n";
msg += " sensitive data (PCBID, card ID, etc)\n";
msg += "\n";
}
for (auto messages : errors) {
for (auto message : messages) {
for (const auto &messages : errors) {
for (const auto &message : messages) {
msg += " " + message + "\n";
}
msg += "\n";
@@ -63,13 +95,13 @@ namespace deferredlogs {
msg += " unsure what to do next?\n";
msg += " * update to the latest version:\n";
msg += " https://github.com/spice2x/spice2x.github.io/releases/latest\n";
msg += " https://github.com/spice2x/spice2x.github.io/releases\n";
msg += " * check the FAQ:\n";
msg += " https://github.com/spice2x/spice2x.github.io/wiki/Known-issues\n";
msg += "\n";
msg += "\\------------------------- spice2x auto-troubleshooter ------------------------/\n";
log_warning("troubleshooter", "{}", msg);
log_special("troubleshooter", "{}", msg);
});
}
}