summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-01-06 22:05:20 +0100
committerPetr Mrázek <peterix@gmail.com>2014-01-06 22:05:45 +0100
commit267f18ca814cbe96e9581dfbf79b744543d1e8b8 (patch)
tree3b10950bf479e43cdb023932a5975fe5f98f28f9
parent0a312d3b08a40d51acc1952df3ed2f0348f4aa5e (diff)
downloadMultiMC-267f18ca814cbe96e9581dfbf79b744543d1e8b8.tar
MultiMC-267f18ca814cbe96e9581dfbf79b744543d1e8b8.tar.gz
MultiMC-267f18ca814cbe96e9581dfbf79b744543d1e8b8.tar.lz
MultiMC-267f18ca814cbe96e9581dfbf79b744543d1e8b8.tar.xz
MultiMC-267f18ca814cbe96e9581dfbf79b744543d1e8b8.zip
Add hack for Nvidia
-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