mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 21:11:39 +00:00
Merge pull request #306 from alexey-lysiuk/osx_vid_autoswitch
Added control of automatic graphics switching on OS X
This commit is contained in:
commit
60a0966f0f
2 changed files with 12 additions and 0 deletions
|
@ -72,6 +72,11 @@ CUSTOM_CVAR(Bool, fullscreen, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
|
||||||
setmodeneeded = true;
|
setmodeneeded = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CUSTOM_CVAR(Bool, vid_autoswitch, true, CVAR_ARCHIVE | CVAR_GLOBALCONFIG | CVAR_NOINITCALL)
|
||||||
|
{
|
||||||
|
Printf("You must restart " GAMENAME " to apply graphics switching mode\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
RenderBufferOptions rbOpts;
|
RenderBufferOptions rbOpts;
|
||||||
|
|
||||||
|
@ -399,6 +404,11 @@ CocoaVideo::CocoaVideo(const int multisample)
|
||||||
attributes[i++] = NSOpenGLPFAStencilSize;
|
attributes[i++] = NSOpenGLPFAStencilSize;
|
||||||
attributes[i++] = NSOpenGLPixelFormatAttribute(8);
|
attributes[i++] = NSOpenGLPixelFormatAttribute(8);
|
||||||
|
|
||||||
|
if (!vid_autoswitch)
|
||||||
|
{
|
||||||
|
attributes[i++] = NSOpenGLPFAAllowOfflineRenderers;
|
||||||
|
}
|
||||||
|
|
||||||
if (multisample)
|
if (multisample)
|
||||||
{
|
{
|
||||||
attributes[i++] = NSOpenGLPFAMultisample;
|
attributes[i++] = NSOpenGLPFAMultisample;
|
||||||
|
|
|
@ -43,5 +43,7 @@
|
||||||
</array>
|
</array>
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
|
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||||
|
<string>YES</string>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
||||||
|
|
Loading…
Reference in a new issue