Make OpenAL debugging easier
This commit is contained in:
parent
e864aa2ff2
commit
19a5dcbffc
|
@ -324,6 +324,23 @@ int Launcher::exec() {
|
||||||
// Must be started before Platform is started.
|
// Must be started before Platform is started.
|
||||||
Logs::start(this);
|
Logs::start(this);
|
||||||
|
|
||||||
|
if (Logs::DebugEnabled()) {
|
||||||
|
const auto openalLogPath = QDir::toNativeSeparators(
|
||||||
|
cWorkingDir() + qsl("DebugLogs/last_openal_log.txt"));
|
||||||
|
|
||||||
|
qputenv("ALSOFT_LOGLEVEL", "3");
|
||||||
|
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
_wputenv_s(
|
||||||
|
L"ALSOFT_LOGFILE",
|
||||||
|
openalLogPath.toStdWString().c_str());
|
||||||
|
#else // Q_OS_WIN
|
||||||
|
qputenv(
|
||||||
|
"ALSOFT_LOGFILE",
|
||||||
|
QFile::encodeName(openalLogPath));
|
||||||
|
#endif // !Q_OS_WIN
|
||||||
|
}
|
||||||
|
|
||||||
// Must be started before Sandbox is created.
|
// Must be started before Sandbox is created.
|
||||||
Platform::start();
|
Platform::start();
|
||||||
Ui::DisableCustomScaling();
|
Ui::DisableCustomScaling();
|
||||||
|
|
Loading…
Reference in New Issue