From 8d04b65ae9d5d35e763146d12023c794c743a3fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= <morten.sorvig@digia.com>
Date: Mon, 13 Jan 2014 22:11:12 +0100
Subject: [PATCH] Mac: Prevent switching to discrete GPU on startup

By default, OpenGL-based apps will switch multi-GPU
Macs over to discrete graphics hardware.

It is possible to prevent this, and it makes sense
to do so for Qt Creator since its users will typically
be more concerned with power usage than raw OpenGL
performance.

Commit 8166a34f makes the necessary change to QtBase
and this commit enables the non-switching behavior
by adding the NSSupportsAutomaticGraphicsSwitching
key to the Info.plist

Change-Id: Iea6ef4b4922645f792cfb9b8b0b8860f5b2c0674
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
---
 src/app/Info.plist.in | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/app/Info.plist.in b/src/app/Info.plist.in
index 290a4e7bc73..6bbfcc3a020 100644
--- a/src/app/Info.plist.in
+++ b/src/app/Info.plist.in
@@ -4,6 +4,8 @@
 <dict>
         <key>NSPrincipalClass</key>
         <string>NSApplication</string>
+	<key>NSSupportsAutomaticGraphicsSwitching</key>
+	<true/>
 	<key>CFBundleDocumentTypes</key>
 	<array>
 		<dict>
-- 
GitLab