Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add detection for OpenAL issues on Linux #479

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/handlers/event/analyze_logs/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ pub async fn find(log: &str, data: &Data) -> Result<Vec<(String, String)>> {
intermediary_mappings,
old_forge_new_java,
checksum_mismatch,
linux_openal,
];

let mut res: Vec<(String, String)> = issues.iter().filter_map(|issue| issue(log)).collect();
Expand Down Expand Up @@ -413,3 +414,20 @@ fn checksum_mismatch(log: &str) -> Issue {
let found = log.contains("Checksum mismatch, download is bad.");
found.then_some(issue)
}

fn linux_openal(log: &str) -> Issue {
let issue = (
"Missing .alsoftrc".to_string(),
"OpenAL is missing the configuration file.
To fix this, create a file named `.alsoftrc` in your home directory with the following content:
```
drivers=alsa
hrtf=true
```"
.to_string(),
);

let found = log.contains("Failed to get OpenAL")
|| log.contains("libopenal.so");
found.then_some(issue)
}
Loading