Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -166,6 +166,8 @@ · 165 unmodified lines | |||
| 166 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU | 166 | // On Windows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU |
| 167 | // FIXME seems to be broken. | 167 | // FIXME seems to be broken. |
| 168 | #if defined(Q_OS_WIN) | 168 | #if defined(Q_OS_WIN) |
| 169 | #include <VersionHelpers.h> | ||
| 170 | |||
| 169 | extern "C" { | 171 | extern "C" { |
| 170 | _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; | 172 | _declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001; |
| 171 | } | 173 | } |
| @@ -416,6 +418,16 @@ bool setupEssentials(int& argc, char** argv) { · 244 unmodified lines | |||
| 416 | 418 | ||
| 417 | Setting::preInit(); | 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 | static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset"; | 432 | static const auto SUPPRESS_SETTINGS_RESET = "--suppress-settings-reset"; |
| 421 | bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET); | 433 | bool suppressPrompt = cmdOptionExists(argc, const_cast<const char**>(argv), SUPPRESS_SETTINGS_RESET); |