remove gExtractSfx with instead checking if o2r exists

This commit is contained in:
Demur Rumed 2025-06-08 02:15:50 +00:00
commit 7f24e8285b
3 changed files with 2 additions and 9 deletions

View file

@ -130,7 +130,7 @@ void ActorAccessibility_Init() {
aa->isOn = CVarGetInteger(CVAR_SETTING("A11yAudioInteraction"), 0);
if (!aa->isOn)
return;
aa->extractSfx = CVarGetInteger("gExtractSfx", 0);
aa->extractSfx = !std::filesystem::exists(Ship::Context::GetPathRelativeToAppBundle("accessibility.o2r"));
if (aa->extractSfx)
freezeGame = true;
ActorAccessibility_InitAudio();
@ -141,6 +141,7 @@ void ActorAccessibility_Init() {
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayerUpdate>(ActorAccessibility_OnGameFrameUpdate);
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameStillFrozen>(ActorAccessibility_OnGameStillFrozen);
}
void ActorAccessibility_Shutdown() {
ActorAccessibility_ShutdownAudio();
delete aa;

View file

@ -120,8 +120,6 @@ void SfxExtractor::ripNextSfx() {
}
void SfxExtractor::finished() {
OTRAudio_UninstallSfxCaptureThread(); // Returns to normal audio opperation.
CVarClear("gExtractSfx");
CVarSave();
archive->Close();
archive = nullptr;
freezeGame = false;

View file

@ -202,12 +202,6 @@ void SohMenu::AddMenuSettings() {
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Enables accessibility audio cues"));
AddWidget(path, "Extract Sfx", WIDGET_CVAR_CHECKBOX)
.CVar("gExtractSfx")
.RaceDisable(false)
.Options(CheckboxOptions().Tooltip("Extracts the sfx to be used in accessible audio cues, must be run once for "
"the audio cues to play then restart game"));
AddWidget(path, "EXPERIMENTAL", WIDGET_SEPARATOR_TEXT).Options(TextOptions().Color(Colors::Orange));
AddWidget(path, "ImGui Menu Scaling", WIDGET_CVAR_COMBOBOX)
.CVar(CVAR_SETTING("ImGuiScale"))