summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--Hacks.cpp8
2 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a9bd32c..160d09f5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -529,7 +529,7 @@ QT5_ADD_RESOURCES(GRAPHICS_QRC graphics.qrc)
ADD_LIBRARY(MultiMC_common STATIC ${MULTIMC_SOURCES} ${MULTIMC_UI} ${GENERATED_QRC} ${GRAPHICS_QRC})
# Add executable
-ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32 main.cpp ${MULTIMC_RCS})
+ADD_EXECUTABLE(MultiMC MACOSX_BUNDLE WIN32 main.cpp Hacks.cpp ${MULTIMC_RCS})
# Link
TARGET_LINK_LIBRARIES(MultiMC MultiMC_common)
diff --git a/Hacks.cpp b/Hacks.cpp
new file mode 100644
index 00000000..3c3d8191
--- /dev/null
+++ b/Hacks.cpp
@@ -0,0 +1,8 @@
+#include "MultiMC.h"
+
+#ifdef Q_OS_WIN32
+extern "C"
+{
+__declspec(dllexport) uint32_t NvOptimusEnablement = 0x00000001;
+}
+#endif