summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/yuzu/main.cpp9
-rw-r--r--src/yuzu_cmd/yuzu.cpp9
2 files changed, 18 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 534145f7e..20796e92c 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -44,6 +44,15 @@
44Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin); 44Q_IMPORT_PLUGIN(QWindowsIntegrationPlugin);
45#endif 45#endif
46 46
47#ifdef _WIN32
48extern "C" {
49// tells Nvidia and AMD drivers to use the dedicated GPU by default on laptops with switchable
50// graphics
51__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
52__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
53}
54#endif
55
47/** 56/**
48 * "Callouts" are one-time instructional messages shown to the user. In the config settings, there 57 * "Callouts" are one-time instructional messages shown to the user. In the config settings, there
49 * is a bitfield "callout_flags" options, used to track if a message has already been shown to the 58 * is a bitfield "callout_flags" options, used to track if a message has already been shown to the
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
41extern "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
40static void PrintHelp(const char* argv0) { 49static void PrintHelp(const char* argv0) {
41 std::cout << "Usage: " << argv0 50 std::cout << "Usage: " << argv0
42 << " [options] <filename>\n" 51 << " [options] <filename>\n"