Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -166,6 +166,8 @@ · 165 unmodified lines | ||
| 166 | 166 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU |
| 167 | 167 | // FIXME seems to be broken. |
| 168 | 168 | #if defined(Q_OS_WIN) |
| 169 | +#include <VersionHelpers.h> | |
| 170 | + | |
| 169 | 171 | extern "C" { |
| 170 | 172 | _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; |
| 171 | 173 | } |
| @@ -416,6 +418,16 @@ bool setupEssentials(int& argc, char** argv) { · 244 unmodified lines | ||
| 416 | 418 | |
| 417 | 419 | Setting::preInit(); |
| 418 | 420 | |
| 421 | +#if defined(Q_OS_WIN) | |
| 422 | + // Select appropriate audio DLL | |
| 423 | + QString audioDLLPath = QCoreApplication::applicationDirPath(); | |
| 424 | + if (IsWindows8OrGreater()) { | |
| 425 | + audioDLLPath += "/audioWin8"; | |
| 426 | + } else { | |
| 427 | + audioDLLPath += "/audioWin7"; | |
| 428 | + } | |
| 429 | + QCoreApplication::addLibraryPath(audioDLLPath); | |
| 430 | +#endif | |
| 419 | 431 | |
| 420 | 432 | static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset"; |
| 421 | 433 | bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET); |