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
167// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU167// On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
168// FIXME seems to be broken.168// FIXME seems to be broken.
169#if defined(Q_OS_WIN)169#if defined(Q_OS_WIN)
170#include <VersionHelpers.h>
171
170extern "C" {172extern "C" {
171 _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;173 _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
172}174}
@@ -417,6 +419,16 @@ bool setupEssentials(int& argc, char** argv) { · 244 unmodified lines
417 419
418 Setting::preInit();420 Setting::preInit();
419 421
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
420 432
421 static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";433 static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset";
422 bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET);434 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