mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
iidx,sdvx: detect SuperstepSound init failures and log a message upon crash (#376)
## Link to GitHub Issue, if one exists #345 ## Description of change If we see SuperstepSound failure during boot, remember it, and when the game eventually crashes, log a series of warning messages to surface why the game likely failed to launch. ## Testing Tested both iidx and sdvx with an audio device set to not allow exclusive mode.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
#include "util/memutils.h"
|
||||
#include "util/sigscan.h"
|
||||
#include "util/utils.h"
|
||||
#include "launcher/signal.h"
|
||||
|
||||
#include "external/robin_hood.h"
|
||||
|
||||
@@ -232,6 +233,9 @@ namespace games::iidx {
|
||||
} else if (data.find(" W:touch: missing trigger:") != std::string::npos) {
|
||||
out.clear();
|
||||
return true;
|
||||
} else if (data.find("SuperstepSound: Audio device is not available") != std::string::npos) {
|
||||
launcher::signal::SUPERSTEP_SOUND_ERROR = TRUE;
|
||||
return false;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
#include "io.h"
|
||||
#include "acioemu/handle.h"
|
||||
#include "cfg/configurator.h"
|
||||
#include "launcher/signal.h"
|
||||
|
||||
static decltype(RegCloseKey) *RegCloseKey_orig = nullptr;
|
||||
static decltype(RegEnumKeyA) *RegEnumKeyA_orig = nullptr;
|
||||
@@ -209,6 +210,10 @@ namespace games::sdvx {
|
||||
out = "";
|
||||
return true;
|
||||
}
|
||||
if (data.find("SuperstepSound: Audio device is not available") != std::string::npos) {
|
||||
launcher::signal::SUPERSTEP_SOUND_ERROR = TRUE;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,9 @@ namespace launcher::signal {
|
||||
// settings
|
||||
bool DISABLE = false;
|
||||
bool USE_VEH_WORKAROUND = false;
|
||||
|
||||
// states
|
||||
bool SUPERSTEP_SOUND_ERROR = false;
|
||||
}
|
||||
|
||||
#define V(variant) case variant: return #variant
|
||||
@@ -111,6 +114,13 @@ static LONG WINAPI TopLevelExceptionFilter(struct _EXCEPTION_POINTERS *Exception
|
||||
" RivaTuner Statistics Server (RTSS), MSI Afterburner, kernel mode anti-cheat");
|
||||
}
|
||||
|
||||
if (launcher::signal::SUPERSTEP_SOUND_ERROR) {
|
||||
log_warning("signal", "audio initialization error was previously detected during boot!");
|
||||
log_warning("signal", " (W:SuperstepSound: Audio device is not available!!!)");
|
||||
log_warning("signal", " this crash is most likely related to audio init failure");
|
||||
log_warning("signal", " fix your audio device, double check your audio options/patches, and try again");
|
||||
}
|
||||
|
||||
// walk the exception chain
|
||||
struct _EXCEPTION_RECORD *record_cause = ExceptionRecord->ExceptionRecord;
|
||||
while (record_cause != nullptr) {
|
||||
|
||||
@@ -5,6 +5,7 @@ namespace launcher::signal {
|
||||
// settings
|
||||
extern bool DISABLE;
|
||||
extern bool USE_VEH_WORKAROUND;
|
||||
extern bool SUPERSTEP_SOUND_ERROR;
|
||||
|
||||
//void print_stacktrace();
|
||||
void attach();
|
||||
|
||||
Reference in New Issue
Block a user