History

Merge pull request #9129 from Atlante45/audio-dll

Select Audio DLL at runtime

Brad Hefta-Gaub committed 9 years ago

Commit c9545ca2 parents c3db270 db263df3 files · +29 −30Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+12−0
@@ -167,6 +167,8 @@ · 166 unmodified lines
167167 // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
168168 // FIXME seems to be broken.
169169 #if defined(Q_OS_WIN)
170+#include <VersionHelpers.h>
171+
170172 extern "C" {
171173 _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
172174 }
@@ -417,6 +419,16 @@ bool setupEssentials(int& argc, char** argv) { · 244 unmodified lines
417419
418420 Setting::preInit();
419421
422+#if defined(Q_OS_WIN)
423+ // Select appropriate audio DLL
424+ QString audioDLLPath = QCoreApplication::applicationDirPath();
425+ if (IsWindows8OrGreater()) {
426+ audioDLLPath += "/audioWin8";
427+ } else {
428+ audioDLLPath += "/audioWin7";
429+ }
430+ QCoreApplication::addLibraryPath(audioDLLPath);
431+#endif
420432
421433 static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";
422434 bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t