mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 12:04:18 +02:00
fixes/patches for win32/vs2013 startup and shutdown
This commit is contained in:
parent
c815ee53c9
commit
7a2897fb6b
3 changed files with 18 additions and 0 deletions
|
@ -3357,7 +3357,10 @@ void Application::updateWindowTitle(){
|
|||
title += " - ₵" + creditBalanceString;
|
||||
}
|
||||
|
||||
#ifndef WIN32
|
||||
// crashes with vs2013/win32
|
||||
qDebug("Application title set to: %s", title.toStdString().c_str());
|
||||
#endif !WIN32
|
||||
_window->setWindowTitle(title);
|
||||
}
|
||||
|
||||
|
|
|
@ -164,14 +164,24 @@ void Audio::audioMixerKilled() {
|
|||
resetStats();
|
||||
}
|
||||
|
||||
|
||||
QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) {
|
||||
QAudioDeviceInfo result;
|
||||
#ifdef WIN32
|
||||
// NOTE
|
||||
// this is a workaround for a windows only QtBug https://bugreports.qt-project.org/browse/QTBUG-16117
|
||||
// static QAudioDeviceInfo objects get deallocated when QList<QAudioDevieInfo> objects go out of scope
|
||||
result = (mode == QAudio::AudioInput) ?
|
||||
QAudioDeviceInfo::defaultInputDevice() :
|
||||
QAudioDeviceInfo::defaultOutputDevice();
|
||||
#else
|
||||
foreach(QAudioDeviceInfo audioDevice, QAudioDeviceInfo::availableDevices(mode)) {
|
||||
qDebug() << audioDevice.deviceName() << " " << deviceName;
|
||||
if (audioDevice.deviceName().trimmed() == deviceName.trimmed()) {
|
||||
result = audioDevice;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -277,6 +287,7 @@ QAudioDeviceInfo defaultAudioDeviceForMode(QAudio::Mode mode) {
|
|||
pMMDeviceEnumerator = NULL;
|
||||
CoUninitialize();
|
||||
}
|
||||
|
||||
qDebug() << "DEBUG [" << deviceName << "] [" << getNamedAudioDeviceForMode(mode, deviceName).deviceName() << "]";
|
||||
|
||||
return getNamedAudioDeviceForMode(mode, deviceName);
|
||||
|
|
|
@ -215,7 +215,11 @@ void Resource::allReferencesCleared() {
|
|||
_cache->addUnusedResource(self);
|
||||
|
||||
} else {
|
||||
#ifndef WIN32
|
||||
// Note to Andrzej this causes a consistent crash on windows/vs2013
|
||||
// patching here as a very temporary workaround. --craig
|
||||
delete this;
|
||||
#endif // !WIN32
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue