diff options
| author | 2018-04-19 20:22:26 +0200 | |
|---|---|---|
| committer | 2018-04-19 12:22:26 -0600 | |
| commit | 8a47e7e49361180498094ae5e41aa1f75958c025 (patch) | |
| tree | e0640edd0182ba57322b98985ee9a6fcb1747b0b /src/yuzu_cmd/yuzu.cpp | |
| parent | Merge pull request #352 from bunnei/fix-microprofile (diff) | |
| download | yuzu-8a47e7e49361180498094ae5e41aa1f75958c025.tar.gz yuzu-8a47e7e49361180498094ae5e41aa1f75958c025.tar.xz yuzu-8a47e7e49361180498094ae5e41aa1f75958c025.zip | |
Implement Pull #3528 from citra: use nvidia graphics automatically on laptops with optimus (with AMD support) (#271)
* Port 3528: use nvidia graphics automatically on laptops with optimus
* Force dedicated AMD Card for switchable Graphics
* Ran clang-format
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
| -rw-r--r-- | src/yuzu_cmd/yuzu.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 261312f62..a91140447 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -37,6 +37,15 @@ | |||
| 37 | #include "yuzu_cmd/config.h" | 37 | #include "yuzu_cmd/config.h" |
| 38 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" | 38 | #include "yuzu_cmd/emu_window/emu_window_sdl2.h" |
| 39 | 39 | ||
| 40 | #ifdef _WIN32 | ||
| 41 | extern "C" { | ||
| 42 | // tells Nvidia and AMD drivers to use the dedicated GPU by default on laptops with switchable | ||
| 43 | // graphics | ||
| 44 | __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; | ||
| 45 | __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; | ||
| 46 | } | ||
| 47 | #endif | ||
| 48 | |||
| 40 | static void PrintHelp(const char* argv0) { | 49 | static void PrintHelp(const char* argv0) { |
| 41 | std::cout << "Usage: " << argv0 | 50 | std::cout << "Usage: " << argv0 |
| 42 | << " [options] <filename>\n" | 51 | << " [options] <filename>\n" |